Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ app.post("/register", (req, res) => {
} else {
User.create({name: req.body.name, email: req.body.email, password: req.body.password1}, (err, done) => {
if (err) {
res.status(400);
res.render("error", {message: "error"});
} else {
res.status(200);
res.render("index1");
}
});
Expand All @@ -64,4 +66,4 @@ app.listen(process.env.PORT, (err) => {
return;
}
console.log(`Server is up and running on http://localhost:${process.env.PORT}`);
});
});
4 changes: 2 additions & 2 deletions views/index.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% include partials/header %>

<div class="main" style="padding-bottom: 0px; padding-top: 16px;">
<div class="main">

<!-- Sign up form -->
<section class="signup">
Expand Down Expand Up @@ -45,4 +45,4 @@
</section>
</div>

<% include partials/footer %>
<% include partials/footer %>
4 changes: 2 additions & 2 deletions views/index1.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% include partials/header %>

<div class="main" style="padding-bottom: 0px; padding-top: 16px;">
<div class="main">

<!-- Sing in Form -->
<section class="sign-in">
Expand Down Expand Up @@ -39,4 +39,4 @@

</div>

<% include partials/footer %>
<% include partials/footer %>
9 changes: 7 additions & 2 deletions views/partials/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

<!-- Main css -->
<link rel="stylesheet" href="/css/style.css" type="text/css">

<style>
.main {
padding-bottom: 0px;
padding-top: 16px;
}
</style>
</head>
<body>
<body>