Giter VIP home page Giter VIP logo

mini_proj_4's Introduction

mini_proj_4

A restful api created using express and node.js to perform crud applications on a TODO book list...

Step 1 : The main file to access the API is the app.js file a) it firstly imports all the built in node packages b) then middleware is defined to access posts.js in the routes directorry c) connection is established with the mongodb server using mongoose client.

Step 2 : set up the .env file to refer the database from

Step 3 : Set the schema of the NoSql mongodb file in Post.js

const PostSchema = mongoose.Schema({ title: { type: String, required: true, }, description: { type: String, required: true, }, data: { type: Date, default: Date.now, }, });

This is the Schema we are following

Step 4 : Declare the GET, POST, PATCH and DELETE requestd for the TODO api in the posts.js file

  1. GET (FIRST)

  1. GET BY ID

  1. DELETE BY ID

  1. TO CONFIRM HERE'S THE GET AFTER THE DELETE REQUEST

  1. POST A NEW REQUEST AFTER THAT DELETE HAS BEEN MADE

  1. TO CONFIRM HERE'S THE GET AFTER THE POST REQUEST

  1. PATCH A REQUEST TO THE TODO

mini_proj_4's People

Contributors

f20180751 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.