Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
fastify
GitHub Repository: fastify/point-of-view
Path: blob/main/benchmark/express.js
106 views
1
'use strict'
2
3
process.env.NODE_ENV = 'production'
4
5
const express = require('express')
6
const app = express()
7
8
app.set('view engine', 'ejs')
9
10
app.get('/', (_req, res) => {
11
res.render('../../templates/index.ejs', { text: 'text' })
12
})
13
14
app.listen(3000, err => {
15
if (err) throw err
16
console.log('server listening on 3000')
17
})
18
19