- Easiest way to run a node server: Sensible defaults & includes everything you need with minimal setup.
pwa-christmas
is based on the following libraries & tools:
- PWA
- Notification
- Offline
- Install Homescreen
- Responsive Mobile
- Runs everywhere: Can be deployed via
now
,up
, AWS Lambda, Heroku etc.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Install Node LTS 8
- Download: https://nodejs.org/en/download/
Install yarn as global packages if not npm install -g yarn
yarn install
You can use npm. But I recommend usage yarn instead of npm
yarn start || npm start
Server will start with port http://localhost:8080
npm build || npm build
Server will start with port http://localhost:4500 and environment NODE_ENV is development with yarn dev or production with yarn production
By default application will run with environment development. If you want to specify environment, ex: testEnvironment. You modify on folder scripts part of package.json file as below:
Current:
"dev": "cross-env NODE_ENV=development nodemon --exec babel-node src/index.js",
Change to:
"dev": "cross-env NODE_ENV=testEnvironment nodemon --exec babel-node src/index.js",
To deploy your application server with Heroku, follow these instructions:
- Download and install the Heroku Command Line Interface (previously Heroku Toolbelt)
- Log in to the Heroku CLI with
heroku login
- Navigate to the root directory of your
app
server - Create the Heroku instance by executing
heroku create
- Deploy your app server by executing
git push heroku master
Join me. if you run into issues or have questions. I love talking to you!