diff --git a/README.md b/README.md index 5a03241..21c1c63 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,20 @@ Currently I'm searching for an alternative for AWS S3 that I can use for free. ## Tech stacks * Go - * + * Node.js (for development on `client`) + * Postgres + * Redis That's it. +## Development + +Two ways of doing this: + 1. Install all the tech stack on your local machine + 2. Use docker-compose + +See README files on each project directory for further instruction on how to run the development environment. + ## License Copyright 2021-present Jokes Bapak2 API Contributors diff --git a/api/README.md b/api/README.md index 8a39360..f374aaf 100644 --- a/api/README.md +++ b/api/README.md @@ -2,7 +2,20 @@ Still work in progress -## +## Development + +```bash +# Install modules +$ go install +# or +$ go mod vendor + +# run the local server +$ go run ./ + +# build everything +$ go build ./ +``` ## Modules diff --git a/api/go.mod b/api/go.mod index b11b870..bed05e1 100644 --- a/api/go.mod +++ b/api/go.mod @@ -3,6 +3,6 @@ module github.com/aldy505/jokes-bapak2-api/api go 1.16 require ( - github.com/gin-gonic/gin v1.7.1 // indirect - github.com/rs/cors v1.7.0 // indirect + github.com/gin-gonic/gin v1.7.1 + github.com/rs/cors v1.7.0 ) diff --git a/api/main.go b/api/main.go index 7a3af9e..7dba6b0 100644 --- a/api/main.go +++ b/api/main.go @@ -1,6 +1,7 @@ package main import ( + "log" "net/http" "github.com/aldy505/jokes-bapak2-api/api/routes" @@ -12,5 +13,6 @@ func main() { Addr: "localhost:3000", Handler: routes, } + log.Printf("[info] Server is running on http://localhost:3000") server.ListenAndServe() } diff --git a/client/README.md b/client/README.md index 666cadb..c617db0 100644 --- a/client/README.md +++ b/client/README.md @@ -1,2 +1,21 @@ -# Client +# Jokes Bapak2 Client +Still work in progress + +## Development + +Please install Yarn first by doing `npm i -g yarn` + +```bash +# install dependency +$ yarn install + +# run the local server +$ yarn dev + +# build the package +$ yarn build + +# preview it before deployment +$ yarn preview +```