Skip to content

fsantecchia/restify-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST API with Restify

Run locally

Install packages

$ npm install

Run the server

$ npm start

http://localhost:5001

In order to check your code, the project has some linters installed

$ npm run lint

Docs

Create new model with REST endpoints

Add a new file inside the 'models' folder and export a json with the necessary props:

mongooseModelName (required): this will be use to create the REST routes.

schema (required): mongoose schema props must be here.

statics: here you add custom functions which will be called in custom urls that you have to add at the end of route.js.

populate: array with props to be populated in the find().

The router.js file handles the REST request automatically when the model file is created.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published