-
Notifications
You must be signed in to change notification settings - Fork 3
Contributing
Contributing to rage-analytics-backend is easy:
- Fork rage-analytics-backend on http://github.com/e-ucm/rage-analytics-backend
- Hack away and send a pull request on Github!
After forking the repository you must execute the following command:
npm install && npm run fast-setup && npm run gen-apidoc
.
This will generate the necessary configuration files for running and testing the module.
In order to check if everything works properly you must have MongoDB daemon running and only then execute npm test
. If all tests have successfully passed, you can launch the service with npm start
and check out http://localhost:3300
(3300
is the port by default). All default values can be changed in the fast-setup.
You should take a look at a more detailed deployment guide.
If you modify a public API, or add a new one, make sure to correctly document these changes with the APIDOCJS format, this will automatically generate the API documentation when the pull request is merged and will be available here.
Don't forget to add the proper tests to the recent changes and additions. Our tests are located in /tests folder and are executed using mocha and shouldjs.
Keep in mind that rage-analytics-backend is licensed under the Apache 2.0 license before you decide to do code contributions.
If you work with rage-analytics-backend code, we require you to use the JSHint rules located in the root directory of the repository. With WebStorm you can easily enable JSHint checking. You can also execute npm run lint
to do a fast check and see if everything works before sending us the pull request, though npm test
is preferred.
We mostly follow the usual Node Java Script Style, and so should you.
A few things we'd rather not like to see:
- Underscores in any kind of identifier
- Hungarian notation
- Prefixes for fields or arguments
- Curly braces on new lines
If you modify an existing file, follow the style of the code in there.
If you create a new JavaScript file, please add at least some documentation that explains the usage and scope of the file. You can omit documentation for methods that are self-explanatory.
Pull requests for the master repository will be checked by at least one core contributor before inclusion. We may reject your pull requests to master if we do not deem them to be ready or fitting. Please don't take offense in that case. We need to make sure things stay somewhat sane and stable.
rage-analytics-backend uses a forked public project methodology. Here is a concise tutorial to help you get acquainted with the relevant Git commands for this project type.
Before you leave check out this Programming Best Practices Quotes for developers from around the web.