69 lines
1.3 KiB
Markdown
69 lines
1.3 KiB
Markdown
# Project wretched-machines-backend
|
|
|
|
One Paragraph of project description goes here
|
|
|
|
## Getting Started
|
|
|
|
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
|
|
|
|
## MakeFile
|
|
|
|
run all make commands with clean tests
|
|
```bash
|
|
make all build
|
|
```
|
|
|
|
build the application
|
|
```bash
|
|
make build
|
|
```
|
|
|
|
run the application
|
|
```bash
|
|
make run
|
|
```
|
|
|
|
Create DB container
|
|
```bash
|
|
make docker-run
|
|
```
|
|
|
|
Shutdown DB container
|
|
```bash
|
|
make docker-down
|
|
```
|
|
|
|
live reload the application
|
|
```bash
|
|
make watch
|
|
```
|
|
|
|
run the test suite
|
|
```bash
|
|
make test
|
|
```
|
|
|
|
clean up binary from the last build
|
|
```bash
|
|
make clean
|
|
```
|
|
|
|
|
|
|
|
## Using make on Windows
|
|
|
|
1. Make sure you have MinGW installed.
|
|
2. Open your terminal in administrator.
|
|
3. Make sure you are in command prompt with `cmd`.(not powershell)
|
|
4. Run the following command. (replace C:\bin\make.exe with your own path in your PATH env variable)
|
|
```cmd
|
|
mklink C:\bin\make.exe C:\MinGW\bin\mingw32-make.exe
|
|
```
|
|
5. Close all terminal sessions and open a new terminal. Test that it works with `make`.
|
|
|
|
|
|
## Using Air for live reload
|
|
|
|
1. Install air with `go install github.com/air-verse/air@latest`.
|
|
2. Then run with `air -c .air.toml`, or if you have make installed then `make watch`.
|