UNPKG

node-api-document

Version:

🚀 Generate beautiful, interactive API documentation for Node.js/Express applications with zero configuration. Features include password protection, custom branding, responsive design, and easy integration. Perfect for REST APIs, microservices, and web ap

19 lines (16 loc) • 487 B
const express = require('express'); const app = express(); var session = require('express-session'); const api_doc = require('./route') app.use(session({ secret: 'keyboard cat', resave: false, saveUninitialized: true, cookie: { secure: false, maxAge: (60000 * 120) } })) app.get('/', api_doc.index); app.get('/login', api_doc.index); app.post('/login', api_doc.login); app.get('/dashboard', api_doc.dashboard); app.get('/logout', api_doc.logout); module.exports = app;