The guide herein describes how to get the Cron server up and running
Before starting the server locally, ensure you have updated the app.env
file with proper configuration for the environment variables.
Run the following commands to start a server:
npm install pm2 -g
npm install
npm start
Run the following command to start the local server:
sh local/start.sh
While this project is largely made up of scripts, it's no excuse to write crappy code. Linting and unit tests have been setup for the project. To run linting:
npm run lint
To run unit tests:
npm test
All commands are to be run from a node environment which you can access in docker by running the command:
docker exec -it cronserver bash
A one-time job run can be achieved using the command:
npm run job job_name date_to_run_for[optional]
where job_name is the name of the job file (without the .js) as found in app/jobs directory and the date_to_run for is an optional date argument which can be supplied to run for a specific date
Yuidocjs is used to generate code documentation. To do this, run the following commands:
npm install yuidocjs -g
yuidoc .
A directory would be created in the project root called out
where you'd find the index.html
entry point for the generated docs
MIT