Using MongoDB with Express
Starting with the code we did in the last tutorial, we will now demonstrate using MongoDB with Express on Node.js. 1. First we had set up a mongolab database called “firstdb” with a...
read moreTutorial using express.static
The express.static middleware let user access a public directory. Continuing from our last tutorial, we add the statement … app.use(express.static(__dirname + ‘/public’)); And...
read moreTutorial using ejs with Express
In this tutorial, we will use ejs with Express and Node.js. ejs is embedded Javascript template engine suitable for use with Express applications on Node.js. We assume that you have Node.js...
read moreUsing placeholders in ExpressJS routing
Starting with the code from our first ExpressJS app linked here, we now want to use placeholders in ExpressJS routing. Let’s add the following code … In the route...
read moreOur First NodeJS / ExpressJS app
This the code for our first NodeJS and ExpressJS app … You can put this code in either app.js or index.js. But of course your package.json file should reference the correct filename...
read moreUsing Swig templates with ExpressJS
In our last tutorial, we were only outputting strings with res.send. But we want to output HTML page instead. In real-world application, we would use a templating engine like Jade or Swig....
read moreAll contents are opinions and are copyrighted and may contain display ads and ad links for which site may receive revenues from.
See Terms of Use and Privacy Policy.