A boilerplate for building applications with a middleend
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dev
dist
server
tests
Gruntfile.js
README.md
config.json
package.json
server.js

README.md

middleend-boilerplate

A boilerplate for building applications with a middleend. This is an ongoing project, trying to build good concepts on handling different aspects of a middleend.

Deps

You have to install Node JS over at Node JS. When installed you need the grunt-cli node module.

npm install grunt-cli -g

You might have to use 'sudo'.

sudo npm install grunt-cli -g

Install middleend

You just have to install the project dependencies. In the root folder of the project.

npm install

You might have to use 'sudo'.

sudo npm install

Running the middleend

You have to start the server.js file in the project root folder.

node server

Go to localhost:3000 and login with user: jim and password: jim. You can change this in server/authentication.js,at the top.

Deploying your application

You use grunt to deploy the project.

grunt deploy

To run it in production:

NODE_ENV=production node server

or on windows:

SET NODE_ENV=production
node server

Testing your application

To run the tests:

grunt test

This will run the specs defined under tests/specs.

Writing a test

Good to know

Authentication

Fake responses

The config

Templating

Validating