0.3.7 • Published 7 years ago

letrest v0.3.7

Weekly downloads
158
License
-
Repository
-
Last release
7 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

7 years ago

0.3.6

8 years ago

0.3.5

8 years ago

0.3.4

8 years ago

0.3.3

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.38

8 years ago

0.0.37

8 years ago

0.0.35

8 years ago

0.0.34

9 years ago

0.0.33

9 years ago

0.0.32

9 years ago

0.0.31

9 years ago

0.0.30

9 years ago

0.0.29

9 years ago

0.0.28

9 years ago

0.0.26

9 years ago

0.0.25

9 years ago

0.0.24

9 years ago

0.0.23

9 years ago

0.0.22

9 years ago

0.0.21

9 years ago

0.0.20

9 years ago

0.0.19

9 years ago

0.0.18

9 years ago

0.0.17

9 years ago

0.0.16

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.5-2

9 years ago

0.0.5

9 years ago

0.0.4-1

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2-3

9 years ago

0.0.2-2

9 years ago

0.0.2-1

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago