For the Restaurant Reviews projects, you will incrementally convert a static webpage to a mobile-ready web application. In Stage One, you will take a static design that lacks accessibility and convert the design to be responsive on different sized displays and accessible for screen reader use. You will also add a service worker to begin the process of creating a seamless offline experience for your users.
- Clone this repo
git clone https://github.com/LuXDAmore/mws-restaurant-stage-3/
- Go to the folder
- Run
npm install
[ In my computer i have installed ImageMagick, so if you are experiencing issues in images-tasks
probably you'll need to install it. ]
- Development, with livereload:
npm run dev
ornpm run serve
- Staging, with livereload:
npm run staging
ornpm run serve:staging
- Production, with livereload:
npm run production
ornpm run serve:production
- Production, no livereload:
npm run production
ornpm run view:production
It watch files under the dist/
folder, on port 4000
, to changing it check var options
in the gulpfile.js
*
- Production in the
dist/
folder:npm run build
- Staging in the
dist/
folder:npm run build:staging
- Github Pages in the
docs/
folder:npm run build:github:pages
Live Netlify - Live Github Pages
Main configurations are in the gulpfile.js
file, in a variable called options
;
For Github Pages, you should read the documentation setting branch master
with docs/
folder and you should check var options.github
in the gulpfile.js
This building tool is compatible with Netlify.
--
curl "http://localhost:1337/restaurants/"
curl "http://localhost:1337/restaurants/{3}"
Local server:
- Node.js
- Sails.js
--
npm run start
: development, Port: 1337
npm run sailsjs
: production, Port: 1337, you manually have to go to url http://localhost:1377
Served from .tmp/public
folder
--
--
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>,
"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>