I merge this repo to start off a new web app. Read the wiki to learn how to do so.
In order to avoid "it works in my box!" situations as much as possible, this project uses Vagrant and assumes you know its basics. If you're not familiar with Vagrant, check out that link and learn about it.
npm start
If this is the first time you're running this command, or if you do not have the
version of the Vagrant box required by Vagrantfile
, you'll have to wait quite
a few minutes in order for Vagrant to download the VM from the cloud.
When you get a success message, go to http://localhost:23791/
on a browser on
your host machine.
You should see the app load!
Now make a change to any part of the code base. You will see the changes reflect on the browser on the go. This is called hot-loading/live-reloading.
npm run build
If this is the first time you're running this command, or if you do not have the
version of the Vagrant box required by Vagrantfile
, you'll have to wait quite
a few minutes in order for Vagrant to download the VM from the cloud.
Once the command succeeds, go to the ./dist/
directory, and there you will
find an optimized static web app whose starting point is index.html
.
Whenever npm start
or npm run build
doesn't work inside the Vagrant VM,
vagrant destroy
is your best friend.
This resets the VM to the state where npm start
and npm run build
were known
to work.
A lot of work has gone into making sure these commands work out of the box.
If npm start
or npm run build
still breaks, then you've discovered a new
bug.
Please report it.
Every time the master
branch gets a new commit, Travis
CI deploys the release build onto Firebase Hosting.
Make sure the environment variable FIREBASE_TOKEN
set on Travis CI to your
token (read
this to
learn how to obtain this token).
This is a single-page web application built with the following choices:
Built with React.js.
Babel allows JSX/ES6 syntax.
A customized use of Bootstrap is made possible via LESS syntax.
Uses Webpack as the build system.
This app used version 0.0.3 of chcokr-webapp-starter as a template to start off of.
The Vagrant box used by this repo comes with:
You can always fetch and merge the recent changes from chcokr-webapp-starter
into this project:
git remote add starter https://github.com/chcokr/chcokr-webapp-starter.git
git fetch starter
git merge starter/master
npm install
Also, always feel free to share your new discoveries about webapp writing by reporting them to upstream!