Code Monkey home page Code Monkey logo

11-12-express's Introduction

How to start server:

To start server please verify that you have installed mongoDB and mongoose then run the following code in your command line npm run dbon and node main.js

This will allow us to connect to our MongoDB. Mongoose acts as the middleware that connects us from our computer to the MongoDB.

Request endpoints:

paintingRouter.post()

paintingRouter.post() is how we send new data to MongoDB. If there is no database available to receive the new data we've attempted to send, the server will display a 400 error and error message will read 'Responding with a 400 error code.' If the new data is posted successfully to MongoDB, the server will display a 200 message and the message will read 'POST - responding with a 200 status code'.

paintingRouter.get()

paintingRouter.get() is how we send retrieve data from MongoDB. If there is no database available to receive the new data we've attempted to send, the server will display a 404 error and error message will read 'GET - responding with a 404 status code'. If the new data is retrieved successfully from MongoDB the server will display a 200 message and the message will read 'GET - responding with a 200 status code'.

paintingRouter.delete()

paintingRouter.delete() is how we delete data from MongoDB. If there is no database available to delete the data we've attempted to delete, the server will display a 404 error and error message will read 'DELETE - responding with a 404 status code.' If there is no specific id available in the database to delete, the server will display a 400 error and error message will read 'DELETE - no id in the query responding with a 400 status code.' If the new data is posted successfully to MongoDB the server will display a 200 message and the message will read 'DELETE - responding with a 200 status code'.

paintingRouter.post()

paintingRouter.post() is how we send new data to MongoDB. If there is no database available to receive the new data we've attempted to send, the server will display a 400 error and error message will read 'Responding with a 400 error code.' If the new data is posted successfully to MongoDB the server will display a 200 message and the message will read 'POST - responding with a 200 status code'.

Developed by Josiah G, Sarah G, and Zachary S. version 1.0.0

11-12-express's People

Contributors

josiahgr avatar vladimirsan avatar

Watchers

James Cloos 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.