https://github.com/nitor-infotech-oss/node-fastify-starter
https://github.com/nitor-infotech-oss/node-fastify-starter
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nitor-infotech-oss/node-fastify-starter
- Owner: nitor-infotech-oss
- Created: 2020-07-13T09:05:25.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-13T10:37:13.000Z (over 2 years ago)
- Last Synced: 2025-04-07T13:37:26.861Z (6 months ago)
- Language: JavaScript
- Size: 32.2 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NodeJS Boilerplate
This is a boilerplate application for building REST APIs in Node.js using ES6 and Fastify. Intended for use with Postgres using Sequelize ORM.
## Installation
This application uses yarn, so let's install yarn first.
```bash
npm install -g yarn
```
Install dependencies:```bash
yarn
```## Usage
Set environment (vars):
```bash
cp .env-sample .env
```Start server:
```bash
yarn start
```Run tests:
```bash
# Run tests written in ES6
yarn test
```## Set up database:
Run migrations
```bash
sequelize db:migrate
```
Run seeds
```bash
sequelize db:seed:all
```
Create new migration file
```bash
sequelize model:generate --name User --attributes name:string,email:string
```
Generate new seed file
```bash
sequelize seed:generate --name add-new-user
```** Database details can be updated in the .env file
## License
[ISC](https://opensource.org/licenses/ISC)