individual route and page stub

This commit is contained in:
Ava Gaiety W 2023-03-11 10:36:24 -06:00
parent 0f049f97a2
commit 12cecf4a94
3 changed files with 25 additions and 9 deletions

View file

@ -15,6 +15,7 @@ npm start
```
[http://localhost:3000/](http://localhost:3000/)
[http://localhost:3000/she/her/her/hers/herself](http://localhost:3000/she/her/her/hers/herself)
### Testing

31
app.js
View file

@ -1,14 +1,27 @@
import express from 'express';
import { engine } from 'express-handlebars';
import express from 'express'
import { engine } from 'express-handlebars'
const app = express();
const app = express()
app.engine('handlebars', engine());
app.set('view engine', 'handlebars');
app.set('views', './views');
app.engine('handlebars', engine())
app.set('view engine', 'handlebars')
app.set('views', './views')
app.get('/', (req, res) => {
res.render('home');
});
res.render('home')
})
app.listen(3000);
app.get('/:nominative/:accusative/:pronominal_possessive/:predicative_possessive/:reflexive', (req, res) => {
const {
nominative,
accusative,
pronominal_possessive: pronominalPossessive,
predicative_possessive: predicativePossessive,
reflexive,
} = req.params
res.render('individual', {
nominative, accusative, pronominalPossessive, predicativePossessive, reflexive
})
})
app.listen(3000)

View file

@ -0,0 +1,2 @@
<h1>Individual</h1>
{{nominative}}/{{accusative}}/{{pronominalPossessive}}/{{predicativePossessive}}/{{reflexive}}