Skip to content
/ Nord.js Public

Nord.js brings together all the required Nord libraries to get the next generation backend framework up and running

License

Notifications You must be signed in to change notification settings

Nordjs/Nord.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Nord.js

Nord.js brings together all the required Nord libraries to get the next generation backend framework up and running

Getting Started

Create an index.js or server.js in your project root:

const NordServer = require('nord').Server;
const server = new NordServer('./app'); // same as const server = new NordServer();
server.start();

Then create an app folder and within that folder a js file. That file should export an ES6 Class which extends Nord's Resource class with functions named after the HTTP Request methods (get, post, patch, etc) you want to cater for.

E.g. Create app/cards.js

import {Resource} from 'nord';

export default class Cards extends Resource {
  get() {
    return this.res.json({text: 'woohhooo get!'});
  }
}

That's it. Happy coding.

Note: This uses Nord's simple router and will support more complex app strutures with the upcoming advanced router.

About

Nord.js brings together all the required Nord libraries to get the next generation backend framework up and running

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published