A simple web app allowing animators to sign up for the Slack Channel.
- node.js (node v4.2+ and npm 3.5.4+ recommended)
- hapi (app server) + various helper plugins
- handlebars (templating)
- HTML and CSS!
- Clone repo
- install dependencies with
npm install
(assuming you have a node + npm development environment) - set an environment variable named
SLACK_API_TOKEN
with your slack API TOKEN (keep it private, don't publish it in the source code) See https://api.slack.com/web to get a slack API token. - run
node dist/index.js
to start the hapi server - visit the web address (for local testing this is
http://localhost:8000/invite
)
The views (user interface) are handlebars templates (HTML with variables).
You will find them in the views/
folder.
There are views for the form, success message, and various possible errors.
Some error messages (e.g. invalid email) are not handled very nicely at present. Most users should be covered by HTML5 validation in their browser anyway.
Static files are served from the htdocs/
folder. This is a good place to put CSS and any client-side JavaScript.
Access static files directly from the root of the webserver.
For example: htdocs/invite.css
will be available on the server as /invite.css
.
Source code is in src/index.es6
. The file in dist/
has been transpiled to ES5 for backwards compatibility.
Use node run build
to generate dist/index.js
from the ES6 source.
The only route implemented is /invite
(plus any static files).
To configure other routes or change the port the server runs on (default 8000
), edit src/index.es6
.