https://github.com/icapps/nodejs_boilerplate
https://github.com/icapps/nodejs_boilerplate
express node nodejs
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/icapps/nodejs_boilerplate
- Owner: icapps
- License: isc
- Created: 2021-11-30T12:34:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-30T13:55:10.000Z (over 4 years ago)
- Last Synced: 2025-01-28T21:17:53.573Z (over 1 year ago)
- Topics: express, node, nodejs
- Language: JavaScript
- Homepage:
- Size: 139 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NodeJS Boilerplate
A boilerplate project for new RESTful APIs using Node.js and Express
## Installation and Documentation
### Prerequisites
- [Node](https://nodejs.org/en/)
- [NVM](https://github.com/nvm-sh/nvm)
- [Docker](https://www.docker.com/products/docker-desktop)
### Project dependencies
```bash
# We use npm for this project
# Install project dependencies
$ npm install
```
### Running the server
Before starting the server, we need to have a filled in `.env`.
See `.env.example` for the required values.
```bash
# Build the server
$ npm run build
$ npm run start
```
## Scripts
### Building and running
```bash
# Removes previous build
$ npm run clean
# Removes previous build and create new one
$ npm run build
# Start server
$ npm run start
# Start application in watch mode
$ npm run serve
```
### Database
```bash
# General
# Reset the database (rollbacks, migrates and seeds the database)
$ npm run db:reset
```
### Formatting + linting
```bash
# Check codebase for linting or code formatting errors
$ npm run lint
$ npm run format:check
```
### Docker
```bash
# Create (and start) docker containers
$ docker compose up -d
# Start docker containers
$ docker compose start
# Stop running containers
$ docker compose stop
```
### Testing
```bash
# Run tests
$ npm run test
```
## License
This project is licensed under the ISC License - see the [LICENSE.md](LICENSE) file for details