1.0.8 • Published 1 year ago

express-boilerplate-node v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

express-boilerplate-node

Fast, unopinionated, minimalist boilerplate Node.js.

NPM Version NPM Install Size NPM Downloads

├── docker-compose.yml
├── Dockerfile
├── package.json
├── package-lock.json
├── prettier.config.js
├── src
│   ├── app.ts
│   ├── common
│   ├── config
│   ├── connection.ts
│   ├── controllers
│   ├── helpers
│   ├── interfaces
│   ├── models
│   ├── responses
│   ├── server.ts
│   ├── test
│   ├── utils
│   └── validations
├── swagger.json
└── tsconfig.json

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 0.10 or higher is required.

If setting this first time using npm install command globally:

Installation is done using the npm install express-boilerplate-node -g command:

$ npm install express-boilerplate-node -g

Contribute to readMe.

Features

  • Easy and efficient code.
  • Integrated with husky hooks for pre commit.
  • Highly scalable at large stages
  • Good test coverage
  • MVC structure with environment variables
  • 3 database structure with example
  • Executable for generating applications quickly

Quick Start

The quickest way to get started with express is to utilize the executable npx express-boilerplate-node to generate a template as shown below:

Install the executable. The executable's major version will match Express's:

$ npm install -g express-boilerplate-node

Create the boilerplate:

$ npx express-boilerplate-node [project-name]

Select boilerplate

 ? select the databse you want to use ? (Use arrow keys)

❯ cassendra database
 mongoDB database
 Mysql database

Plate setup:

$ npm run set

Start the docker:

$ docker compose up

Start app:

$ npm run dev

Build app:

$ npm start

View the backend at: http://localhost:${PORT}/api/typec

Philosophy

The main philosophy is to provide small, robust tooling for backend developers, making it a great solution for quick application setup on diverse databses, HTTP APIs.

express-boilerplate-node does not force you to use any specific ORM or template engine. With support for over

Examples

To view the examples, clone the boilerplate repoz and install the dependencies:

cassandra-database

$ git clone https://github.com/coolveer/boilerplate-node-express-cassandra
$ cd boilerplate-node-express-cassandra
$ npm run set

mongodb-database

$ git clone https://github.com/coolveer/boilerplate-node-express-mongodb
$ cd boilerplate-node-express-mongodb
$ npm run set

cassandra-database

$ git clone hhttps://github.com/coolveer/boilerplate-node-express-mysql
$ cd boilerplate-node-express-mysql
$ npm run set

Then run whichever example you want:

$ npm run dev

Contributing

Linux Build Linux Build Windows Build Test Coverage

Our project welcomes all constructive contributions. Contributions take many forms, from code for bug fixes and enhancements, to additions and fixes to documentation, additional tests, triaging incoming pull requests and issues, and more!

Feel free to contribute at express-boilerplate-node-github

Running Tests

To run the test , :

$ npm run fix   //eslint && prettier && mocha-chai tests
$ npm test      //mocha-chai test

Contributors

License

ISC

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago