qotnews/readerserver/main.js

16 lines
557 B
JavaScript
Raw Normal View History

const port = 33843;
2019-08-21 03:49:06 +00:00
const express = require('express');
const app = express();
const simple = require('./simple');
2019-08-21 03:49:06 +00:00
app.use(express.urlencoded({ extended: true }));
app.get('/', (req, res) => res.send(simple.FORM));
app.post('/', (req, res) => simple.scrape(req, res));
app.post('/details', (req, res) => simple.details(req, res));
// app.post('/browser', (req, res) => browser.scrape(req, res));
// app.post('/browser/details', (req, res) => browser.details(req, res));
2019-08-21 03:49:06 +00:00
app.listen(port, () => {
console.log(`Example app listening on port ${port}!`);
});