From 2d72847d392df79c54b80c549bc22eb661d53b12 Mon Sep 17 00:00:00 2001 From: Ruslan Talpa Date: Tue, 10 Nov 2015 10:30:07 +0200 Subject: [PATCH 1/2] modify build from source steps to also copy the bin to the right location --- docs/install/server.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/install/server.md b/docs/install/server.md index e5d731c2b..986e5430b 100644 --- a/docs/install/server.md +++ b/docs/install/server.md @@ -36,18 +36,24 @@ $ ./postgrest -d dbname -U postgres -a postgres --v1schema public When a prebuilt binary does not exist for your system you can build the project from source. You'll also need to do this if you want to help with development. [Stack](https://github.com/commercialhaskell/stack) makes it easy. It will install any necessary Haskell dependencies on your system. * [Install Stack](https://github.com/commercialhaskell/stack#how-to-install) for your platform -* Build the project +```bash +#ubuntu example +wget -q -O- https://s3.amazonaws.com/download.fpcomplete.com/ubuntu/fpco.key | sudo apt-key add - +echo 'deb http://download.fpcomplete.com/ubuntu/trusty stable main'|sudo tee /etc/apt/sources.list.d/fpco.list +sudo apt-get update && sudo apt-get install stack -y +``` +* Build & install in one step ```bash git clone https://github.com/begriffs/postgrest.git cd postgrest -stack build +sudo stack install --install-ghc --local-bin-path /usr/local/bin ``` * Run the server ```bash -stack exec postgrest -- arg1 arg2 +postgrest dbconnectionstring arg1 arg2 # ... your arguments after the double dashes ``` @@ -82,4 +88,3 @@ To use PostgREST you will need an underlying database. You can use something lik * [Instructions for OS X](http://exponential.io/blog/2015/02/21/install-postgresql-on-mac-os-x-via-brew/) * [Instructions for Ubuntu 14.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-14-04) - From 92174dc0d2631ffec4956137ffc0599b4470b602 Mon Sep 17 00:00:00 2001 From: Ruslan Talpa Date: Tue, 10 Nov 2015 10:31:22 +0200 Subject: [PATCH 2/2] modify build from source steps to also copy the bin to the right location (remove small comment) --- docs/install/server.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/install/server.md b/docs/install/server.md index 986e5430b..f1fffa50b 100644 --- a/docs/install/server.md +++ b/docs/install/server.md @@ -54,7 +54,6 @@ sudo stack install --install-ghc --local-bin-path /usr/local/bin ```bash postgrest dbconnectionstring arg1 arg2 -# ... your arguments after the double dashes ``` If you want to run the test suite, stack can do that too: `stack test`.