Something went wrong. Try again.
A simple lightweight Node.js backend framework with zero dependencies
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829import ZingJS from "zingjs";
const app = new ZingJS({ enableCors: true, enableRateLimit: false, enableLogging: true, serveStatic: true, enableDocs: true,});
// Middlewareapp.use((req, res, next) => { console.log(`Request: ${req.method} ${req.url}`); next();});
// Custom eventapp.on('customEvent', (data) => { console.log('Received event:', data);});
app.emit('customEvent', { message: 'Hello from ZingJS!' });
app.listen(3000, () => console.log("Server running on http://localhost:3000"));