Skip to content

💚 This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js. But in most cases, I would recommend you to use something like Express in a production project for productivity purposes.

Notifications You must be signed in to change notification settings

dantas-dev/vanilla-node-rest-api-tdd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vanilla Node by Eduardo Dantas

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js. But in most cases, I would recommend you to use something like Express in a production project for productivity purposes.

What is inside?

This project uses lot of stuff such as:

Getting Started

  1. clone repository and go to project folder
git clone https://github.com/EduD/vanilla-node-rest-api-tdd.git
cd vanilla-node-rest-api-tdd
  1. Create .env and populate database:
# see .env.example to create same variables in .env
touch .env
npm run seed
  1. run the development server:
npm run dev

You can use insomnia to test all endpoints

# ROUTES
GET      /tasks
POST     /tasks
GET      /task/:id
PUT      /task/:id
DELETE   /task/:id

Commands

# runs your application (you need config your .env with variable "PORT")
npm run dev

# Populate fake data  (you need config your .env with variable "SEED_AMOUNT")
npm run seed

# run all tests
npm run test

# run all unit tests
npm run test:unit

# run all integration tests
npm run test:integration

# run code coverage
npm run test:coverage

About

💚 This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js. But in most cases, I would recommend you to use something like Express in a production project for productivity purposes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published