mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-02 01:19:31 +00:00
Configured express to use ejs templating language
This commit is contained in:
4
app.js
4
app.js
@@ -25,6 +25,10 @@ async function main() {
|
||||
// Initialise express app
|
||||
const app = express();
|
||||
|
||||
// Set up templating language and path
|
||||
app.set('view engine', 'ejs');
|
||||
app.set('views', path.join(__dirname, '/views/pages'));
|
||||
|
||||
// Set up parsers to allow reading of POST form data
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.urlencoded({ extended: true }));
|
||||
|
||||
Reference in New Issue
Block a user