Quick Start
Follow these steps to get running for local development.
Step 1 - clone it
Clone the repository into your development space with a new project name. And then you'll want to cd
into it.
git clone [email protected]:tomatau/breko-hub.git <directory-name>
cd <directory-name>
Step 2 - install
Download the development dependencies into your project.
npm i
'nuff said.
Step 3 - .env
file (optional)
Breko-hub creates an environment based on your .env
file. This file isn't tracked by github. In production, set environmental variables for the same settings. We have supplied an example .env
to work with named example.env
. Use the example.env
to create an .env
file with suitable settings.
mv example.env .env
Edit the values in your .env file. For example, change NODE_ENV=
to production when you want to build for production. The DEBUG
setting controls strings printed to your command line and browser console.
Step 4 - start
Now start the application to run the server and open the application in your browser.
npm start
With the default .env
file, this starts your application in development mode. A configuration for running the debugger with a colourful console output for debugging.
Your console shows your app is listening on localhost at port 9001. The PORT setting in the .env
file controls port number the app listens to. As it's a starter kit, there's minimal implementation and you'll be looking to remove.
open http://localhost:9001
Step 5 - stop
Now, stop your app with a Ctrl+C
and smile!
Step 6 - Make it yours!
Create a repository for your project. You'll want to update the github remote to your project.
git remote set-url origin <newurl>
The last step is to edit the package.json
file contents to use your project repository and name.
NB: I am planning to make this process easier! Any suggestions welcome!
TODO:
- make a script to strip out example code
- OR, make a generator script for creating a project