1.0.0 • Published 2 years ago
@siliconminds/test v1.0.0
API Template
This template offers boilerplate code for generating siliconminds apis
Quick start
Installing:
npm install
Development:
npm run dev
Production:
npm run start
Features
Overview
- file uploads
- templated emails
- pdf generation
- role based auth
- prototyping crud
- dynamic routing
- dynamic model loading
- javascript env file
Dynamic model loading
All models in the 'src/models/' directory are automatically loaded, to make importing easyer
You can import a model like this:
const { Users } = require('models');
Dynamic routing
All routes in the 'src/routes/' directory are automatically mounted at the '/v1/' endpoint.
Route files starting with '_' are ignored
Enviroment variables
The env.js file mounts all the env vars on the process.env object. This allows for dynamic env vars, so you can use the node path module for example.
1.0.0
2 years ago