Skip to content

Markdown Blog Using Node.js, Express, And MongoDB

Notifications You must be signed in to change notification settings

yishanhsieh/my-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

instruction Video

How To Build A Markdown Blog Using Node.js, Express, And MongoDB - Web development simplified

install

npm in express mongoose ejs
npm i --save-dev nodemon

markdown post

  • 42'07: render markdown post porperly and use slug instead of post ID.
  • import libraries as the following code:
npm i marked slugify

  • import marked function in show.ejs:
const { marked } = require("marked");
// destructing is needed
  • 52'21 : convert markdown to HTML. Need to sanitize the HTML, so people can run JavaScript on computers.
  • render a html inside a ejs, do the following code:
npm i dompurify jsdom 

About

Markdown Blog Using Node.js, Express, And MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published