Giter Club home page Giter Club logo

rest-api-course-v2's Introduction

Created as part of the course on "REST API".

Demonstrates the setting up of URI for the REST API

UDEMY Discount Link

https://www.udemy.com/course/rest-api/?referralCode=ADE763DAA790A3F0D211

Change Log

October 2019 Converted the code to use MongoDB Cloud Updated the package.json with latest versions Took care of the depercations Updated the index.js for DB parameters setting

December 2017 Updated the DB Connection code Data updated for the testing. Instead of providing the User/Password now the URI for DB is used in the format: mongodb://:@SERVER:PORT/DB-NAME

Setup

  1. Clone this project on local file system

git clone https://github.com/acloudfan/REST-API-Course-V2.git

  1. Pre-requisistes a. Understanding of node/npm b. An instance of MongoDB available either locally or remotely c. Import the data available in the repository

  2. Run > npm install Deploys the packages express body-parser mongoose

  3. Switch between branches

git checkout errorhandling

Create from scratch

  1. create the project

  2. git init

  3. add .gitignore

  4. npm init

  5. npm install the packages (express,body-parser,mongoose)

  6. create folder = models

Helpful Links

https://github.com/felixge/node-style-guide https://blog.risingstack.com/node-js-best-practices/

rest-api-course-v2's People

Contributors

acloudfan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rest-api-course-v2's Issues

function error in the testdbops.js

during the test of db connections, the function error occured .

apple@Aaron-Chong-MacBook-Air REST-API-Course-V2 % node tests/TestDbOps.js
node:events:491

throw er; // Unhandled 'error' event
^

ReferenceError: criteria is not defined
at /Users/apple/Downloads/REST-API-Course-V2/tests/TestDbOps.js:43:52
at /Users/apple/Downloads/REST-API-Course-V2/db/vacations.js:38:9
at /Users/apple/Downloads/REST-API-Course-V2/node_modules/mongoose/lib/model.js:5074:18
at processTicksAndRejections (node:internal/process/task_queues:78:11)
Emitted 'error' event on Function instance at:
at /Users/apple/Downloads/REST-API-Course-V2/node_modules/mongoose/lib/model.js:5076:15
at processTicksAndRejections (node:internal/process/task_queues:78:11)
apple@Aaron-Chong-MacBook-Air REST-API-Course-V2 %

can someone help on this >??

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.