0.3.7 • Published 8 years ago

letrest v0.3.7

Weekly downloads
158
License
-
Repository
-
Last release
8 years ago

#Let Rest Framework to really REST on your Rest.

##Overview Framework to implement a full secured Rest service just using declarative JSON configuration files

##Dependencies

  • Express 4.0
  • Body parser
  • moment
  • jwt-simple
  • uw
  • jsonschema
  • pg (Depends on the selected strategies)
  • q
  • winston

##Install

npm install letrest

##Config

The config file should be in the upper folder of the node_modules.

FileDescription
config.jsthis is related to UW configuration, not a specific let-rest configuration)
letrest_entities.jsonConfigure all the services asociated to the entities
letrest_security.jsonConfigure all the security services related parameters
letrest_schema.jsonConfigure how has to validate all the JSON recived on the server

##Code

This code it is a basic boilerplate of a Express server. We have added comments so you can easily add the framework to your code

	var express    = require('express'); 		//We requre the package
	var app        = express(); 				//We create the server
	var bodyParser = require('body-parser');	//Body parser, now separated since 4.0
	app.use(bodyParser());						//We set the parser as the first middleware
	var port = process.env.PORT || 8080; 		//We define the port

	// ROUTES FOR OUR API
	// =============================================================================
	var router = express.Router(); 				// get an instance of the express Router
	require('letrest').config(app,router);
	app.use('/api', router);					//We add a base to the URL for all request
	app.listen(port);							//We start the server loop
0.3.7

8 years ago

0.3.6

9 years ago

0.3.5

9 years ago

0.3.4

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.38

9 years ago

0.0.37

9 years ago

0.0.35

10 years ago

0.0.34

10 years ago

0.0.33

10 years ago

0.0.32

10 years ago

0.0.31

10 years ago

0.0.30

10 years ago

0.0.29

10 years ago

0.0.28

10 years ago

0.0.26

10 years ago

0.0.25

10 years ago

0.0.24

10 years ago

0.0.23

10 years ago

0.0.22

10 years ago

0.0.21

10 years ago

0.0.20

10 years ago

0.0.19

10 years ago

0.0.18

10 years ago

0.0.17

10 years ago

0.0.16

10 years ago

0.0.15

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.5-2

10 years ago

0.0.5

10 years ago

0.0.4-1

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2-3

10 years ago

0.0.2-2

10 years ago

0.0.2-1

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago