Skip to content

REST and Socket.io API backend server, based on NodeJS and ExpressJS.

License

Notifications You must be signed in to change notification settings

litixsoft/baboon-backend

Repository files navigation

baboon-backend

REST and Socket.io API backend server, based on NodeJS and ExpressJS.

npm Build Status david-dm david-dm

Baboon-Backend 0.10.X works only with Node 10.X.X. Just bug fixing, No new features :-( .

Baboon backend server is a toolkit to create backends on the basis of NodeJS and ExpressJS with an API which can be accessed via REST and WebSocket. The toolkit is independent of any front-end and can be developed separately. The application structure is already set and ready to run.

With the help of the features in the toolkit and the generator-baboon-backend you can develop your backend functionality in record time. Especially helpful in development mode is the live-reload, and the already built-in test suite.

Baboon backend is completely open source and available under the MIT license. If you need commercial support, you send an email to us. [email protected]

Features

  • Complete Application Structure
  • Ready to run
  • Create API with simple controllers
  • Call controller via REST and WebSocket
  • Controller can be nested in modules structure
  • Application can monitor changes in the development mode and self-reload. (livereload)
  • Application is easy to test
  • Test Suite jasmine-node integrated
  • High test coverage with regression tests
  • MongoDB integration with lxMongoDb or native driver
  • Coverage reports integrated
  • Grunt with development, test and report tasks

Installation

There are several ways to install Baboon backend and use. This project is a reference implementation and can be used as a template for your own project. More you can find already under Contributing and testing

Install global dependencies grunt-cli

$ sudo npm install -g grunt-cli

Finally, create a project directory and install baboon

$ mkdir my-project && cd my-project
$ git clone https://github.com/litixsoft/baboon-backend.git .
$ npm install

You can run the application in live-reload mode with:

$ grunt serve

Or Manual without live-reload with:

$ npm start

Test your application (unit tests and jshint) with:

$ grunt test   

Coverage your tests with:

$grunt cover

Release a new patch with:

$ grunt release

Release a new minor version with:

$ grunt release:minor

Release a new major version with:

$ grunt release:major

Another possibility is to only use the library.
If you only want to use the library in your own application design, it is enough just to install this

$ npm install baboon-backend

But remember that you will receive nothing more than the library. Everything else you must implement yourself.

Contributing and testing

Use the reference application as seed for your project or help the project expand. The following instructions describe how to install the reference application. If you would like to participate in the project, note the advice of the coverage and the examples.

Install global dependencies

$ npm install -g grunt-cli 

Install reference application

$ git clone https://github.com/litixsoft/baboon-backend.git
$ cd baboon-backend
$ npm install

Run and test reference application

Run

Start the application with Live reload. Very helpful during development. The configuration of the command can be set in the Gruntfile.js/nodemon/dev.

$ grunt serve

Start the application without Live reload. The configuration of the command can be set in the package.json/scripts/start.

$npm start

Start the application manually without live reload. Note here the environment variables. This command is run in the background when npm start

$ DEBUG=* PORT=3000 HOST=localhost NODE_ENV=development CONFIG=test PROTOCOL=http node baboon-backend.js

Testing

Run all tests

Complete testing the application with unit tests and jshint.

$ grunt test

Run code coverage

$ grunt cover

Instead of us handing out a formal style guide, simply stick to the existing programming style. Please create descriptive commit messages. We use a git hook to validate the commit messages against these rules. Easily expand Baboon with your own extensions or changes in the functionality of Baboon itself. Use this workflow:

  1. Write your functionality
  2. Create an example of your functionality in the reference application (optional)
  3. Write unit and regression tests for the example
  4. All tests should be successful
  5. Check your test coverage (90 - 100%)
  6. Make a pull request

We will check the tests, the example and test coverage. In case your changes are useful and well tested, we will merge your requests.

Release a new version

We use grunt-bump and grunt-conventional-changelog internally to manage our releases. To handle the workflow, we created a grunt task release. This happens:

  • Bump version in package.json
  • Update the CHANGELOG.md file
  • Commit in git with message "chore: release v[the new version number]"
  • Create a git tag v[the new version number]

Create a new release

Release a new patch

$ grunt release

Release a new minor version

$ grunt release:minor

Release a new major version

$ grunt release:major

Roadmap

Baboon backend is a rolling release and is constantly evolving. Roadmap we list the features that will be integrated next.

  • Extension of system configuration
  • In addition to debug even a logger for console, file and database
  • Based on an audit logger system
  • Login and user management.
  • Rights management and protection of REST and WebSocket API

Author

Litixsoft GmbH

License

Copyright (c) 2014-2018 Litixsoft GmbH Licensed under the MIT license.

About

REST and Socket.io API backend server, based on NodeJS and ExpressJS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages