Skip to content

Kategoria: ExpressJS

Ironhack Day 25

Posted on 6 toukokuun, 20176 toukokuun, 2017 by bjim

Installing the express generator boilerplate files:

$ npm install -g express-generator
$ express example-project –view=ejs –git
$ tree example-project

Posted in Express Generator, ExpressJS, News, NodeJS, Web dev studiesLeave a Comment on Ironhack Day 25

Ironhack Day 18

Posted on 28 huhtikuun, 20173 toukokuun, 2017 by bjim

Express JS:

1a. Variables in ejs files (if using html in them) look like:

<%= title %>

1b. Defining such a variable in your app.js:

app.get(’/’, (req, res, next) => {
let awsome = ”awsome”
res.render(’index’, {title: awsome});
});

2. Variables in ejs layout files (if using html in them) look like:

<%- body %>

Posted in ExpressJS, News, Web dev studiesLeave a Comment on Ironhack Day 18

Arkistot

  • heinäkuu 2017
  • toukokuu 2017
  • huhtikuu 2017
  • marraskuu 2016
  • lokakuu 2016
  • syyskuu 2016
  • elokuu 2016

Kategoriat

  • Angular
  • Bootstrap
  • Bugfixes
  • CSS
  • ES6
  • Express Generator
  • ExpressJS
  • Git
  • GitHub
  • JQuery
  • JS
  • Lodash
  • MongoDB
  • New Releases
  • News
  • NodeJS
  • onLearning
  • Typescript
  • Uncategorized
  • Web dev studies