- Loader
- Express Routes : Controller + Middleware
- Models
- Services
- Injector
- EventEmitter
- Sample Tests
If you are using gh
(https://cli.github.com/) then you can simply do
gh repo create my-own-custom-repo --template="turbopasi/rest-container-template"
If you are using vanilla git
then you should clone and re-initialize for a new repo
git clone https://github.com/turbopasi/rest-container-template my-own-custom-repo
cd my-own-custom-repo
rm -r .git
git init .
For you to be able to create a MongoDB Cloud Connection, add you secret variables to a .env
file in the root directory. See .env.example
for an example.
#MONGODB
MONGODB_USERNAME=""
MONGODB_PASSWORD=""
MONGODB_DATABASENAME=""
cd my-own-custom-repo
npm install
npm run dev
npm test
I started to add convenient code generators using hygen
- To add a new route to the express router run
npm run add:route
- To add a new subroute to the new route run
npm run add:subroute
- To add a new service run
npm run add:service
docker build -t <your username>/rest-container-template .
docker run -p 20300/8080 -d <your username>/rest-container-template