Skip to content

Latest commit

 

History

History
executable file
·
66 lines (44 loc) · 1.54 KB

README.md

File metadata and controls

executable file
·
66 lines (44 loc) · 1.54 KB

Introduction

This web app will fetch and display photos from Flickr's public api service

installation

Clone the repo:

$ git clone https://github.com/uptodatehuang/flickr-photo-search.git my-project
$ cd my-project

Install dependencies:

$ npm install

Install webpack globally

$ npm install -g webpack

development

Run server with:

$ npm start

It runs express server on localhost on port 3000 and webpack-dev-server on port 3001 with proxing requests from the first one to the second one.

You can specify host of the application:

$ APP_HOST=appdomain.com npm start

Application has two separate directory frontend and backend. The entry point for frontend is frontend/app.es6.js file and for backend it is backend/server.js.

production

Build assets for the application:

$ NODE_ENV=production webpack -p --config webpack.production.config.js

Then run the app:

$ NODE_ENV=production npm start

Do not forget to specify your app domain in server.js for production mode!

Reference