1.6 KiB
1.6 KiB
http
A proxy server that will start all subdomain servers and a proxy server to route requests to the correct subdomain based on the URL.
How to setup a subdomain server
- Create a new package in the
packagesdirectory. - Add a
subdomain:startscript to thepackage.jsonfile of the new package. - Optionally add a
subdomain:devscript for development (so you can add things like hot reloading). - It uses the directory name of the package to serve the subdomain.
How to setup a cron job
In your package's package.json, add a script that starts with cron: followed by the cron schedule.
Every minute: `"cron:constantly": "your-script-goes-here"`
Every hour: `"cron:hourly": "your-script-goes-here"`
Every day: `"cron:daily": "your-script-goes-here"` // Runs at midnight
Every week: `"cron:weekly": "your-script-goes-here"` // Runs on Sunday
Every month: `"cron:monthly": "your-script-goes-here"` // Runs on the 1st
If you want to run a script at a specific time, you can use the following format:
ALL TIMES ARE IN UTC!!! ALL TIMES USE THE 24 HOUR FORMAT!!!
cron:hourly@0:25": "your-script-goes-here" // The hour is ignored
cron:daily@1:20": "your-script-goes-here" // This is at 1:20 AM UTC for 1:20 PM use 13:20
cron:weekly@12:00": "your-script-goes-here"
cron:monthly@13:00": "your-script-goes-here"
What happens if you have two scripts with the same cron schedule?
cron:daily": "your-script-goes-here"
cron:daily #comment": "your-script-goes-here" // Everything after # is ignored so you can use this to make cron jobs unique or more readable
You can view the cron job status at http://theworkshop.cc