Express-Sire: Express application generator with flavors.
It brings to the table:
- ESM Modules or CJS
- Express JSON API
- Git
- Prettier
-
Sequelize support with Postgres (sequelize@v6, pg-hstore, pg)
$ npm install -g express-sire
Create the app via interactive cli:
$ express-sire
Install dependencies:
$ npm install
For Sequelize users
Populate the .env with POSTGRES credentials
DATABASE_NAME=
DATABASE_USER=
DATABASE_PASSWORD=
DATABASE_HOST=
DATABASE_DIALECT="postgres"
Create table and properties inside database
$ npm run update-db;
Start your app at http://localhost:3000/
:
$ npm start
$ express-sire -n <new-project> -a
This generator can also be further configured with the following command line flags.
-a, -all ---------------- Include every configuration same as
express-sire -n <new-project> -mn -ms cjs -gf -gi -c -h -s)
-n, --name <name> ------ Project name (mandatory for raw cli only)
-mn, --monorepo --------- Add monorepo folders (backend/ and frontend/) (default: false)
-ms, --modsytem <type> -- Add either cjs|esm. (default: 'cjs')
-gi, --gitignore -------- Add .gitignore (default: false)
-gf, --gitfolder -------- Initialize git folder (default: false)
-c, --compression ------ Add compression package (default:false)
-h, --helmet ----------- Add helmet sequelize (default:false)
-s, --sequelize -------- Add sequelize with Postgres support (default:false)