Make sure you have Node version >= 5.0 and yarn >= 3
# install the repository with yarn
yarn install
# start the server
yarn start
# use Hot Module Replacement
yarn run server:dev:hmr
go to http://0.0.0.0:3000 or http://localhost:3000 in your browser
What you need to run this app:
node
andyarn
(brew install node
)- Ensure you're running the latest versions Node
v5.x.x
+ and yarn3.x.x
+
If you have
nvm
installed, which is highly recommended (brew install nvm
) you can do anvm install --lts && nvm use
in$
to run with the latest Node LTS. You can also have thiszsh
done for you automatically
After you have installed all dependencies you can now run the app. Run yarn run server
to start a local server using webpack-dev-server
which will watch, build (in-memory), and reload for you. The port will be displayed to you as http://0.0.0.0:3000
(or if you prefer IPv6, if you're using express
server, then it's http://[::1]:3000/
).
# development
yarn run server
# production
yarn run build:prod
yarn run server:prod
# development
yarn run build:dev
# production (jit)
yarn run build:prod
yarn run server:dev:hmr
yarn run watch
yarn test
yarn run watch:test
# update Webdriver (optional, done automatically by postinstall script)
yarn run webdriver:update
# this will start a test server and launch Protractor
yarn run e2e
# this will test both your JIT and AoT builds
yarn run ci
yarn run e2e:live
Any stylesheets (Sass or CSS) placed in the src/styles
directory and imported into your project will automatically be compiled into an external .css
and embedded in your production builds.
For example to use Bootstrap as an external stylesheet:
- Create a
styles.scss
file (name doesn't matter) in thesrc/styles
directory. yarn add
the version of Boostrap you want.- In
styles.scss
add@import 'bootstrap/scss/bootstrap.scss';
- In
src/app/app.module.js
add underneath the other import statements:import '../styles/styles.scss';