From e71496d3fd9d6fb67b521aa6ad6f3f1933218db9 Mon Sep 17 00:00:00 2001 From: Jordan Knott Date: Thu, 22 Oct 2020 19:46:26 -0500 Subject: [PATCH] Updated Developers Guide (markdown) --- Developers-Guide.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Developers-Guide.md b/Developers-Guide.md index 3f3602e..f1b1090 100644 --- a/Developers-Guide.md +++ b/Developers-Guide.md @@ -113,3 +113,26 @@ projects, err := repository.GetProjects(ctx) For more info on the `sqlc` query file format, take at look at [its documentation](https://sqlc.dev/). +### Running in development mode + +To run `Taskcafe` in development mode, you will need a postgres database running on your local computer (Docker is a good option for this). + +Then configure Taskcafe to connect to the development database using a `conf/taskcafe.toml` config file (an example can be found in `conf/taskcafe.example.toml`). + +Next open up a terminal and run the API (as well as running initial schema migrations): + +``` +go run cmd/taskcafe/main.go web --migrate +``` + +Next, start the React frontend: + +``` +cd frontend +yarn start +``` + +Now you can access the interface through http://localhost:3000 while the API is served +through http://localhost:3333. The React frontend proxies all API requests to the http://localhost:3333 address. + +You can find a interactive GraphQL playground at http://localhost:3333/__graphql. \ No newline at end of file