# clone the repo
# move into the directory
# Install dependencies
npm install
# Run the app
npm start
## Server will run on port 3000
To develop the app, run npm run dev
. You can access automatic server and client reloading at localhost:7000, which is
proxying localhost:3000.
This dev task uses nodemon to monitor changes on the server, and browser-sync to monitor changes to the client.
The views engine is Handlebars.
node-sass-middleware compiles all the stylesheets in the sass folder to public/stylesheets
Browserify allows us to use require
in our client-side javascript and
bundles everything into a single bundle.js file. It is linked in the layout: <script src='/javascripts/bundle.js'></script>
. Add modules to the client folder and require them in script.js.
This project uses Contentful's Content Delivery API SDK and Content Management API SDK to retrieve and manage data.
Tests use Mocha as the test framework, Chai as the assertions
library, and Istanbul to check test coverage. JSDOM sets up a browser environment for our tests. All tests are can be found in the test folder. Run tests with npm test
. You can watch tests with npm run test -- --watch
.
npm run lint
to lints client side javascript with ESLint.npm run lint-server
lints server side javascript.npm run prettier
to auto formats client side javascript.
Dotenv will load environment variables from a .env file into process.env. Make sure you add your .env file to .gitignore.
# create a heroku repo (this will create your heroku repo and add your remore)
heroku create
# Set the NODE_ENV to 'production
heroku config:set NODE_ENV='production'
# Push your app to heroku
git push heroku master
# Open your deployed app
heroku open