ExpressJS MySQL Boilerplate with REST api generators
- Docker
- Docker Compose
- Any editor that respects
.editorconfig
rules - Hygen:
npm i -g hygen
- Clone repo
- Copy the template of
.example.env
file onto a new file named.env.development
with required credentials. This file is ignored by git. - Run docker containers:
docker-compose up -d
- Check the site running on localhost:4000/ping
- Exec container:
docker-compose exec app bash
We use Hygen to build our generators. The dev Docker image has Hygen
pre-installed. You would have to exec container before executing the generator commands
If you want to generate files outside Docker then Hygen has to be installed separately. In that case please follow the quickstart guide to install it on your environment
- New Route:
hygen route new --resource MyResource --path v1
- New Controller:
hygen controller new --resource MyResource --path v1
- New Service:
hygen service new --resource MyResource
- New Serializer:
hygen serializer new --resource MyResource --path v1