JavaScript (ESM) base website script using a plugin as a router that is lightweight and easy to customize.
- Plugin as Router
- Auto List Feature
- High Optimation
- Easy to Customize
- Show User IP
- Restrict Access (IP Whitelist)
- Request Per Minute Limit
- Suitable for Rest API
- etc.
This is an example of a router
import { Loader } from '../lib/index.js'
const Scraper = Loader.scrapers
export const routes = {
category: 'main',
path: '/api/tempo',
parameter: ['q'],
method: 'get',
execution: async (req, res, next) => {
const { q } = req.query
const json = await Scraper.tempo.search(q)
res.json(json)
},
error: false,
authorize: false,
rpm: false,
restrict: false
}
$ yarn
$ node .
or want to use pm2
$ yarn
$ npm i -g pm2
$ pm2 start pm2.cjs && pm2 logs
/api/tempo?q={query}
Open-API is part of Neoxr API