\ /
-->*<--
/_\
/_\_\
/_/_/_\
/_\_\_\_\
/_/_/_/_/_\
/_\_\_\_\_\_\
/_/_/_/_/_/_/_\
/_\_\_\_\_\_\_\_\
/_/_/_/_/_/_/_/_/_\
/_\_\_\_\_\_\_\_\_\_\
/_/_/_/_/_/_/_/_/_/_/_\
[___]
- Install Node.js [node v8.x and npm v5.x are required]
- Clone this repository
$ git clone git@github.com:particle-iot/xmastree
- Install dependencies
$ npm install
- View available tasks
$ npm run
- Start your local development server
$ npm start
- Start Hacking!
The Particle Christmas Tree app is a single page application intended to run under any static file server. When developing, files are generated from source and served from the ./docs
directory (see configuration) within the repo. To build the application in debug mode and run the local development server, simply enter:
$ npm start
The application can be tailored to its environment through environment variables. For complete details on what can be configured, refer to src/config.js
.
Here's the list of the most important variables and their values:
Environment Variable | Description | Default |
---|---|---|
PATHS_PUBLIC | public directory used to serve static files | ./docs |
PATHS_CLIENT_SRC | location of client application files | ./src/client |
URLS_REPO | url to the github repo hosting the source code for this app | https://github.com/particle-iot/xmastree |
URLS_APP | url to this website | https://particle-iot.github.io/xmastree |
CLIENT_ID | the particle client id for this app (primarily for oauth) | xmastree-prod-1784 |
PARTICLE_API_URL | root url for the particle api | https://api.particle.io |
If you want to host your own copy of the Particle Christmas Tree app, you will first need to register a client:
- create a particle user account
- generate an access token
- create an oauth client
type
should beweb
redirect_uri
should be your url e.g.https://mysite.com/
[note]
- update the
CLIENT_ID
setting within config.js with your new client id
see RELEASE.md