muame-amr / express-getting-started

Create a simple REST API with Express and MongoDB.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting started with Express and MongoDB

Basic usage of Express and MongoDB to create a simple REST API. Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas.

Installation

  1. Clone the repository
git clone https://github.com/muame-amr/express-getting-started.git
  1. Install dependencies
npm install
  1. Run the server
npm run dev
  1. Edit HTTP request in route/route.rest (Alternatively, you can use other tools like curl & postman)

File Structure

bigger project might have different file structures

  1. models/ - data models & schemas
  2. routes/ - API routes or Endpoints or Resources
  3. server.js - file that starts your web server

About

Create a simple REST API with Express and MongoDB.


Languages

Language:JavaScript 98.5%Language:Shell 1.5%