O GoConqr está de visual novo! Conte para nós o que você achou.

Notas

Getting started with express

James Drummond node.js A-Level Inglês 1 página

Conteúdo das notas (1)

Página 1

Hold the phone!

See https://github.com/DaftMonk/generator-angular-fullstack for a Yeoman generator that installs express with Angular.

It also includes options for creating angular services / directives, et;

See http://cwbuecheler.com/web/tutorials/2013/node-express-mongo/

See http://briantford.com/blog/angular-express for creating a restful api with express.

Install Express with NPM so that you can run it from the command line.

Run 'express [new project name]' . This will create a new express project in the same directory as the new project name

You want to update package.json depending on what else you want to install.

- Almost definitely you will want to install mongo, mongoose

Working with handlebars

See https://www.npmjs.com/package/express3-handlebars

You need to tell express which rendering engine to use in app.js:

app.engine('handlebars', exphbs({defaultLayout: 'main'}));

app.set('view engine', 'handlebars');

The default layout argument is specifying that you should use layouts/main.handlebars as the layout template. Other templates, depending on the rendering engine, will be injected into this one in the routes page:

/* GET home page. */ router.get('/', function(req, res, next) {

res.render('home');

});

'home' is views/home.handlebars

Informações

Descrição
A-Level node.js Notas sobre Getting started with express, criado por James Drummond em 24-02-2015.
Criado por
James Drummond
Visualizações
2
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?