Giter Site home page Giter Site logo

sita-backend's Introduction

readme.md

SITA-backend

to run it npm install npm start listening to PORT 5000

Description

Our client needs to create and read comments for each flight they have in our system, with the following information: • ID • Comment • Date • UserId • FlightId • Tags Due to that, we need you to create 2 endpoints using Node Js:

  1. Create comment You will receive the following information: • Comment: String (mandatory) • UserId: Number (mandatory) • FlightId: Number (mandatory) • Tags: String Array (optional) You have to save the information in the database that you want (Mysql or Mongo) creating a unique ID.
  2. Retrieve comments Create an endpoint to retrieve the list of comments for a specific flight ID. You will receive the FlightID and it should return a JSON with the comments.

ROUTES:

GET all flights and by ID Get all comments POST a comment

Models

Flight model
{
commentId: type: Number,
comment: type: String,
date: type: Date,
userId: type: Number,
flightId: type: Number,
tags: type: Array
}

Comment model
{
comment: String,
userId: type: Number,
flightId: [{ type: Schema.Types.ObjectId, ref: "Flight"}],
tags: type: Array
};

Links

Git

The url to the repository Repository Link


sita-backend's People

Contributors

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