Initialization
Once you have installed the library and created your configuration you will be able to initialize the server.
- CommonJS
- ES modules
- TypeScript
const Saffron = require("@poiw/saffron");
const saffron = new Saffron();
(async () => {
// Initialize saffron
await saffron.initialize({ /* configuration */})
// Start sheduler to parse websites.
await saffron.start();
})();
import Saffron from "@poiw/saffron";
const saffron = new Saffron();
(async () => {
// Initialize saffron
await saffron.initialize({ /* configuration */})
// Start sheduler to parse websites.
await saffron.start();
})();
import Saffron from "@poiw/saffron";
const saffron = new Saffron();
(async () => {
// Initialize saffron
await saffron.initialize({ /* configuration */})
// Start sheduler to parse websites.
await saffron.start();
})();