Skip to content

rdsserrao/API-REST

Repository files navigation

Simple Node with Express Server with REST API

Build Status Slack Greenkeeper badge

An easy way to get started with a Express server offering a REST API with Node.js. Read more about it.

Features

  • Express
  • REST API

Requirements

Installation

  • git clone [email protected]:rwieruch/node-express-server-rest-api.git
  • cd node-express-server-rest-api
  • npm install
  • npm start
  • optional: include .env in your .gitignore

GET Routes

Beyond GET Routes

CURL

  • Create a message with:
    • curl -X POST -H "Content-Type:application/json" http://localhost:3000/messages -d '{"text":"Hi again, World"}'
  • Delete a message with:
    • curl -X DELETE -H "Content-Type:application/json" http://localhost:3000/messages/1

Postman

  • Install Postman to interact with REST API

  • Create a message with:

  • Delete a message with:

    Created by rwieruch

    Used by rdsserrao

    The APP is made in a way where it's only possible to add new messages. If you want to add a new user you can do it by changing the src/models/index.js file.

    To make it easyer I added a docker-compose file, so all you have to do is run this cmd in your project directory:

      docker compose-up -d --build
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published