Giter Club home page Giter Club logo

checkpoint-backend-1's Introduction

Setup

  • Fork, Clone, npm install, npm start
  • npm start will bring up the web page, it will not start the server
  • you need to start the server manually

Summary

Your company's front end team has completed a business dashboard requested by management. You need to build the data server that will provide the front end client with the data it needs to show.

Create a server

  • npm isntall express
  • server/index.js
  • listen on port 3001
  • connect to your mlab database

Routes

  • create get routes.
  • look at data.csv. read this file and pull the information out of it
    • /dateTime - return the current time
    • /newComments
    • /newTasks
    • /newOrders
    • /tickets

Database

  • use mlab to create a database
  • add 3 collections: messages, tasks, orders

MVC

  • create Routes, Models and Controllers
  • Look at server/state.js
  • create mongoose models that follow the example data
  • create get routes, use the Models to get data from the database
    • /tasks
    • /orders
    • /messages
  • create post routes, use the Models to insert data into the database
    • /tasks
    • /orders
    • /messages

node-fetch

  • The ceo likes to look at pictures of foxes while reading business reports
  • install node-fetch
  • make a route for /foxes
  • make a http get call to https://randomfox.ca/floof/
  • send back the image value

Run Server

  • start your server with "node index.js" and refresh the client webpage to make sure the data is populating properly.

checkpoint-backend-1's People

Contributors

jw56578 avatar kevincolten avatar

Watchers

 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.