📠👷 Checkpoint

./server.js:530995/153
./views/index.handlebars:530995/29
This commit is contained in:
Glitch (hello-express) 2020-04-11 12:23:34 +00:00
parent 67c8307179
commit 80171dd3ce
2 changed files with 5 additions and 2 deletions

View File

@ -26,7 +26,10 @@ app.set('view engine', 'handlebars');
app.use(express.static("public"));
app.get("/", (request, response) => {
response.render('index', { layout: false });
response.render('index', {
layout: false,
suggestedTitle: randomWords({exactly: 1, wordsPerString: 3, separator: '-', maxLength: 5})
});
});
app.get("/:roomId/join", (request, response) => {

View File

@ -23,7 +23,7 @@
<form>
<label>
Room ID
<input id="roomId" name="roomId" type="text" maxlength="100" required>
<input id="roomId" name="roomId" type="text" maxlength="100" value="{{suggestedTitle}}" required>
</label>
<button type="submit" id="submit-name">Submit</button>
</form>