Commit 021ee6bd authored by julien dehos's avatar julien dehos

clean file tree

parent 7ec78e0d
all:
nix-shell -A client --run "cabal --builddir=dist-client --config-file=client.config build"
nix-shell -A client --run "cabal --builddir=dist-client --config-file=config/client.config build"
mkdir -p static
ln -sf ../dist-client/build/client/client.jsexe/all.js static/
nix-shell -A server --run "cabal --builddir=dist-server --config-file=server.config run server"
nix-shell -A server --run "cabal --builddir=dist-server --config-file=config/server.config run server"
# build client, in a "nix-shell -A client"
client:
cabal --builddir=dist-client --config-file=client.config build
cabal --builddir=dist-client --config-file=config/client.config build
mkdir -p static
ln -sf ../dist-client/build/client/client.jsexe/all.js static/
# run server, in a "nix-shell -A server"
server:
cabal --builddir=dist-server --config-file=server.config run server
cabal --builddir=dist-server --config-file=config/server.config run server
clean:
rm -rf dist-* static/all.js
......
......@@ -4,7 +4,7 @@
## description
- isomorphic web app in Haskell, using Miso and Servant
- isomorphic web app in Haskell, using [Miso](https://github.com/dmjio/miso) and [Servant](https://haskell-servant.github.io)
- fetch data using XHR
......@@ -42,7 +42,13 @@ make server
- build a docker image:
```
nix-build docker.nix && docker load < result
nix-build nix/docker.nix && docker load < result
```
- (test docker image):
```
docker run -p 3000:3000 -it miso-xhr
```
- upload docker image to heroku:
......@@ -55,7 +61,7 @@ docker push registry.heroku.com/miso-xhr/web
heroku container:release web --app miso-xhr
```
- test:
- (test heroku app):
```
heroku logs
......
let
pkgs = import ./nixpkgs.nix ;
miso-xhr-src = ./. ;
miso-xhr-src = ../. ;
server = pkgs.haskell.packages.ghc.callCabal2nix "miso-xhr" ./. {};
client = pkgs.haskell.packages.ghcjs.callCabal2nix "miso-xhr" ./. {};
server = pkgs.haskell.packages.ghc.callCabal2nix "miso-xhr" ../. {};
client = pkgs.haskell.packages.ghcjs.callCabal2nix "miso-xhr" ../. {};
in
......
let
pkgs = import ./nixpkgs.nix ;
pkgs = import ./nix/nixpkgs.nix ;
server = pkgs.haskell.packages.ghc.callCabal2nix "miso-xhr" ./. {};
client = pkgs.haskell.packages.ghcjs.callCabal2nix "miso-xhr" ./. {};
......
......@@ -77,5 +77,3 @@ linkAdd x y = linkURI (safeLink (Proxy @PublicApi) (Proxy @AddApi) x y)
linkHeroes :: URI
linkHeroes = linkURI $ safeLink (Proxy @PublicApi) (Proxy @HeroesApi)
-- TODO linkAdd
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment