Flossy way to build a user registration app/component with Express, Redis and Stylus. It's also a decent starting point for any Express app.
- Node.js 0.4.11+
- Google Apps Account/SMTP Access (or your own SMTP server)
Make sure Redis is installed and running on the server.
wget http://redis.googlecode.com/files/redis-2.2.12.tar.gz tar xzf redis-2.2.12.tar.gz cd redis-2.2.12 make sudo make install
To start the redis-server type:
This will use default config.
In order to specify a config file use
To enter the redis CLI type:
Now you can
SET keys and values. To remove all keys type
Grab the necessary modules (this is a shitty hack, but works for now):
npm install express stylus ejs redis password-hash colors nodemailer && sudo npm install smoosh -g
To fire up your Juke joint, type:
By default, the
app.json file has configuration options set for debugging, on
localhost at port
5050. This can all be configured by simply changing the values.
If you want to change to
localhost but on a production port like
Before you restart the app, you'll need to compress/concat the files with smoosh:
smoosh -c app.json
This will create you minified and concatenated CSS and JS files.
Now, restart the app,
node app.js, and navigate to
If you want to actually run this on a production server there are two things you should do. First, compress/concat with smoosh:
smoosh -c app.json
Next, change the
"LOCALHOST" value to
false and update your CDN values and the verification link to your live site URLs.
For email configuration, open the
email.js file in the
There is a configuration hash there. Update it with your credentials.
Key | Value | Comment
joe | hashedPassw0rdHere!11 | username and hashed password
joe@RAD.com | joe | email address and associated username
joe:isVerified | (un)verified | account verification check
adfs8922dfsa2300 | joe | random, one-time key for account verification
- Create package.json
- Validate incoming inputs.
- Lots moar (see the inline code comments)
Background pattern for the
<body> tag: dinpattern.com