Categorygithub.com/Dalot/goddd
repositorypackage
0.0.0-20210201035750-dd36a91dd14c
Repository: https://github.com/dalot/goddd.git
Documentation: pkg.go.dev

# README

===== Not suited for production =====

Please use the default ports since they are hardcoded, :8080 for the go backend app and :8081 for the frontend app.

$ git clone https://github.com/Dalot/goddd
$ cd goddd

Running a dabatase with docker

docker run --name mysql -e MYSQL_DATABASE=code_challenge -e MYSQL_ROOT_PASSWORD=secret -p 3306:3306 -d mysql:8.0.22

Build the executable and run -cmd migrate to migrate the database and seed it.

$ go build main.go && ./main.exe -cmd migrate
...
[GIN-debug] Listening and serving HTTP on :8080

You can also use -cmd fresh, it will wipe the database and seed it again.

$ go build main.go && ./main.exe -cmd fresh
...
[GIN-debug] Listening and serving HTTP on :8080

And now to run the frontend app.

$ npm install
$ npm run dev 
...
Your application is running here: http://localhost:8081

You can pick up any user you want, fetch any email, login with pw 123123123 or just register a dummy user...

You can also look for the helpers.txt file, it has some curl examples(did not have the time to build a postman collection).