mirror of
1
2
Fork 0
ucaptcha/src/start.js

19 lines
506 B
JavaScript

import {connect as connectToIdb} from './idb.js';
import {app} from './server.js';
import {fetchImagesJob} from './helpers/fetchImagesJob.js';
import {fetchImages} from './helpers/fetchImagesJob.js';
connectToIdb((err)=>{
if (err) {
console.error(err);
process.exit(1);
}
app.listen(process.env.PORT, ()=>{
fetchImagesJob.start();
fetchImages({radius: 500});
console.log('Server started');
console.log('=========================================================');
});
});