Giter Site home page Giter Site logo

jwdp5's Introduction

Orinoco

This is the back end server for Project 5 of the Junior Web Developer path.

Prerequisites

You will need to have Node and npm installed locally on your machine.

Installation

Clone this repo. From within the project folder, run npm install. You can then run the server with node server. The server should run on localhost with default port 3000. If the server runs on another port for any reason, this is printed to the console when the server starts, e.g. Listening on port 3001.

jwdp5's People

Contributors

dependabot[bot] avatar keirodev avatar mostuf avatar training-dev-fr avatar willehpeh avatar xenox avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jwdp5's Issues

Route /order retourne erreur 500

Bonjour,

Lorsque je soumets un JSON qui, à priori, semble correspondre aux valeurs attendues, j'ai une erreur 500 avec postman.
Voici le body de la requête post en question :

{ "contact" : { "firstName": "string", "lastName": "string", "address": "string", "city": "string", "email": "string" }, "products" : [ "516156" , "15145"] }

Vous me confirmez bien que l'api attend bien un objet JSON ?

Les routes /order ne fonctionnent pas.

La requête d'achat du produit revient en erreur, soit 500 pour les routes teddies et furnitures et 400 pour le cameras.
Elle est bien constituées de l'objet contact et du tableau d' id de produit.
Les routes get fonctionnent très bien. Pour la route post on a bien le 200 pour connection au back, mais une erreur est retournbée.

let objt = {
   contact :
  {
    prénom: "Jean",
    nom: "Valjan",
    adresse: "ici et pas ailleurs",
    ville: "Paradise City",
    email: "[email protected]"
  },
   products :[
  "5be9c4471c9d440000a730e8",
  "5be1ef211c9d44000030b062"
    ]
  }

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.