Skip to content

Minimalist Node.js framework with token auth and Grunt task to create boilerplate for new routes.

Notifications You must be signed in to change notification settings

ansorensen/catnap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Catnap

A minimalist Node.js/Express project template designed for ready-to-go auth and quick generation of new routes.

Creating new routes

Use Grunt to quickly generate boilerplate code for new routes. In the catnap directory, run:

$ grunt makeRoute:objectName

The result will be the creation of several files with Node/Express code:

  • models/objectName.js
  • controllers/objectName.js
  • routes/objectName.js

The makeRoute task will also add a line to the server.js file, adding the new routes to the server.

Templates for the route generation can be found and edited in folder Grunt/templates.

Auth

Based on Express-JWT. The login expects 'email' and 'password' fields; if these are accepted, the server returns a JSON web token. This JSON token is required to access any route on the server that begins with /api.

A sign up route in the auth is in development. For the time being, users must be manually entered.

Database

MongoDB and Mongoose.

About

Minimalist Node.js framework with token auth and Grunt task to create boilerplate for new routes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published