This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 1,000,000+ packages pre-installed, including
@financial-times/n-worker with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Setup of basic next enhancements for non-web dynos e.g. cron-jobs, pollers
Sets up node enhamcemets
fetchas a global using isomorphic-fetch
withFlagsdefault false - waits for the flags client to initialise and start polling
nameoptional - will get the app name from package.json if absent
process.cwd()directory in which to look for config code
Returns a Promise.
Constructor for a new cron job, with metrics etc. added.
options expects the same as npm cron.CronJob
Reference to the instance of metrics used by the job
Reference to the instance of flags used by the job