Skip to content

NicolasMaso/api-rest-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

typescript mongodb nodejs express

Description

This project is an API Rest that uses the following technologies:

  • NodeJS
  • Express
  • Typescript
  • MongoDB (Mongoose)

Installation

$ npm install

Configuring the database

  • You need to create a MongoDB database and put the URL connection of your database in the /src/config/dbConnect.ts file.
  • The only part of the URL that is not in the file is the password, you need to configure the variable DB_PASSWORD in the .env file.

Configuring the .env

You have to create a .env file in the project directory root and configure the DB_PASSWORD of your MongoDB database.

  • DB_PASSWORD=password

Running the app

# development
$ npm run dev

Routes

  • The API has routes for Author and Book (the only two models of the project), you can check all the routes available in /src/routes, basically has the CRUD (Create, Read, Update and Delete) operations for both models.

About

A simple REST API project with Node.js, Express, TypeScript and MongoDB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published