Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
nyaa-api
node v6.17.1
version:
1.0.0
endpoint
share
tweet
exports.tonicEndpoint = (req, res) => { let path = req.url.replace(process.env.TONIC_MOUNT_PATH, '').replace(/^\/|\/$/, '') path = parseInt(path) if(isNaN(path)) path = undefined res.end(require('nyaa')(path)) }
Loading…
no comments
sign in
to comment