What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-16 19:50:01
swagger ui express
// To load your swagger specification yaml file you need to use a module able to convert // yaml to json; for instance yamljs. >> npm install --save yamljs const express = require('express'); const app = express(); const swaggerUi = require('swag... Add solution -
Javascript 2021-09-14 22:34:01
require method-override
'use strict'; // Application dependencies const express = require('express'); const cors = require('cors'); const superagent = require('superagent'); const pg = require('pg'); const methodOverride = require('method-override'); // Application setup requir... Add solution -
Javascript 2021-09-04 08:02:02
how to make an express server
const express = require('express'); const app = express(); const PORT = process.env.PORT || 3000; app.get('/', (req, res) => { res.send('<h1>Some HTML</h1>'); res.send('<p>Even more HTML</p>'); }); app.listen(PORT, () =>... Add solution -
Javascript 2021-09-03 11:11:03
explain router.get("/:id(\\d+)
let express = require('express'); let app = express(); app.get('/api/Widgets', (request, response, next) => { // Business logic goes in here... // then we send something in the response, maybe some JSON! response.json({ widgets: [ { id: 1,... Add solution