tewarig / Mongodb-template

this a template for using mongodb with moongose driver with node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mongodb-template

//jshint esversion:6 const express = require("express");
const bodyParser = require("body-parser");
const ejs = require("ejs");

const app = express();
app.use(express.static("public"));
app.set('view engine','ejs');
app.use(bodyParser.urlencoded({
extended: true
}));

app.get("/",function(req,res){
res.render("home");
});

app.get("/login",function(req,res){
res.render("login");
});

app.get("/register",function(req,res){
res.render("register");
});

app.listen(3000 , function (){
console.log("Server started on port 3000");
});

About

this a template for using mongodb with moongose driver with node.js


Languages

Language:JavaScript 100.0%