Skip to content

Instantly share code, notes, and snippets.

@samuchakraborty
Created March 31, 2021 17:04
Show Gist options
  • Save samuchakraborty/0d1b4916a5d74dc7ffbac9ee0ded06f6 to your computer and use it in GitHub Desktop.
Save samuchakraborty/0d1b4916a5d74dc7ffbac9ee0ded06f6 to your computer and use it in GitHub Desktop.
const express = require('express');
const mongoose = require('mongoose');
const bodyParser = require('body-Parser');
const ejs = require('ejs');
const app = express();
app.set('view engine', 'ejs');
app.use(express.static("public"));
app.use(bodyParser.urlencoded({
extended: true
}));
mongoose.connect("mongodb://localhost:27017/wikkiDB",{useNewUrlParser: true, useUnifiedTopology: true });
app.listen(3000, function () {
console.log("server is working");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment