This repository contains source code of project required to complete Mobile Web Specialist Nanodegree from Udacity & Google. It combines all three stages of the project - fixing responsivness, accessibility, adding service worker and implementing whole offline support to create fully functional Progressive Web Application.
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.
# npm i
# npm i sails -g
# node server
debug: Environment : development debug: Port : 1337
http://localhost:1337/restaurants/
http://localhost:1337/restaurants/?is_favorite=true
http://localhost:1337/restaurants/<restaurant_id>
http://localhost:1337/reviews/?restaurant_id=<restaurant_id>
http://localhost:1337/reviews/
http://localhost:1337/reviews/<review_id>
http://localhost:1337/reviews/?restaurant_id=<restaurant_id>
http://localhost:1337/reviews/
{
"restaurant_id": <restaurant_id>,
"name": <reviewer_name>,
"rating": <rating>,
"comments": <comment_text>
}
http://localhost:1337/restaurants/<restaurant_id>/?is_favorite=true
http://localhost:1337/restaurants/<restaurant_id>/?is_favorite=false
http://localhost:1337/reviews/<review_id>
{
"name": <reviewer_name>,
"rating": <rating>,
"comments": <comment_text>
}
http://localhost:1337/reviews/<review_id>
This repository uses leafletjs with Mapbox. You need to replace <your MAPBOX API KEY HERE> with a token from Mapbox. Mapbox is free to use, and does not require any payment information.
EDIT
Add file js/private.js and in it provide const MAPBOX_KEY = 'API KEY'; to make maps work.
Most of the code in this project has been written to the ES6 JavaScript specification for compatibility with modern web browsers and future proofing JavaScript code. As much as possible, try to maintain use of ES6 in any additional JavaScript you write.