Giter Club home page Giter Club logo

basicnodeapp's Introduction

This repository is to explore basics of node.js covering

  1. ES6
  2. Express
  3. MongoDB
  4. Mocha, Chai

Details

  1. Use npm init to create new node project.
  2. Use npm install -D <dependency> to add dev dependency.
  3. Using Babel to transpile ES6 code to native javascript.
    1. Make sure that babel dependencies specified in package.json are added correctly.
    2. Make sure that .babelrc file is created with appropriate presets
  4. Using Express framework for building API server.
  5. Instead of using npm init rather express <project_name> --no-view is used to generate this project.
  6. Express come with many middleware like
    1. morgan
    2. debug
    3. cookie-parser
  7. With express following project structure is followed
    1. app.js: Entry point of the application. Defines mapping of url to route.
    2. routes: Defines mapping of url to REST controller endpoint.
    3. controller: Defines actual endpoint.
  8. On premise Mongo is used to store basic books and author data. Using Mongoose to connect to DB.
  9. Use command babel-node populatedb.js mongodb://localhost:27017/local_library to add dummy data.
  10. Chai along Mocha is used for testing. Mocha is a testing framework, Chai is an assertion library
  11. nyc is used for generating test reports.

basicnodeapp's People

Contributors

swapnilsankla 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.