A lightweight node server library with request and error logging out of the box.
import rewind from 'rewind'; // "type": "module" in package.json
const app = rewind();
app.get('/', async (req, res) => {
res.send('< Rewind <');
});
app.listen(1337, () => {
console.log('server running on 1337');
});
$ npm i @lowlifearcade/rewind
Pass a config object on creation
const app = rewind({
base: '/rewind'
})
Default:
{
base = '/',
loggingEnabled = true,
logsPath = null, // creates a "logs" folder in the root of your project
logTTL = null, // they live forever
}