Giter Club home page Giter Club logo

mws-restaurant-stage-2's Introduction

Local Development API Server

Usage

Get Restaurants

curl "http://localhost:1337/restaurants"

Get Restaurants by id

curl "http://localhost:1337/restaurants/{3}"

Architecture

Local server

  • Node.js
  • Sails.js

Contributors

Getting Started

Development local API Server

Location of server = /server Server depends on node.js LTS Version: v6.11.2 , npm, and sails.js Please make sure you have these installed before proceeding forward.

Great, you are ready to proceed forward; awesome!

Let's start with running commands in your terminal, known as command line interface (CLI)

Install project dependancies
# npm i
Install Sails.js globally
# npm i sails -g
Start the server
# node server

You should now have access to your API server environment

debug: Environment : development debug: Port : 1337

If you find a bug in the source code or a mistake in the documentation, you can help us by submitting an issue to our Waffle Dashboard. Even better you can submit a Pull Request with a fix :)

Archival Note

This repository is deprecated; therefore, we are going to archive it. However, learners will be able to fork it to their personal Github account but cannot submit PRs to this repository. If you have any issues or suggestions to make, feel free to:

mws-restaurant-stage-2's People

Contributors

forbiddenvoid avatar omaralbeik avatar sudkul 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  avatar  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  avatar  avatar  avatar  avatar  avatar

mws-restaurant-stage-2's Issues

Pull requests not being responded to.

@forbiddenvoid Could you please accept one of the multiple pull requests that have been made to fix the restaurants.json issue? There's an error in the database... the last restaurant should have a "photograph: 10" key/value pair. Currently, when students loop through the restaurants to create images for each restaurant they're getting 'undefined' for the 'photograph' property on the last restaurant.

Thank you! :)

Last restaurant (Casa Enrique) missing photograph property

Update this:

{
    "name": "Casa Enrique",
    "neighborhood": "Queens",
    "address": "5-48 49th Ave, Queens, NY 11101",
    ....
},

to:

{
    "name": "Casa Enrique",
    "neighborhood": "Queens",
    "address": "5-48 49th Ave, Queens, NY 11101",
    "photograph": "10",
    ....
},

Reviews API Not Working

In our class we are supposed to have access to the reviews API that serve us JSON data like this for our project:

static get DATABASE_REVIEWS_URL() {
const port = 1337; // Change this to your data server port
return http://localhost:${port}/reviews;
}

Only the restaurants API is working like this:

static get DATABASE_RESTAURANTS_URL() {
const port = 1337; // Change this to your data server port
return http://localhost:${port}/restaurants;
}

Why is the reviews API not working and returning data?

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.