express-generator-dh
v4.8.3
Published
Gerador de aplicações Express focado nas necessidades da Digital House
Downloads
74
Maintainers
Readme
Express Generator DH
Gerador de aplicações Express, focado nas necessidades dos alunos da Digital House.
Início Rápido
O caminho mais rápido para começar um projeto express é usar o executável express-generator-dh
, para gerar uma aplicação, como o exemplo abaixo:
Criar o app:
$ npx express-generator-dh --view ejs meuProjeto
// Isto irá criar uma pasta, chamada 'meuProjeto', com suporte à EJS
Entrar na pasta deste projeto:
$ cd meuProjeto
// Isto faz o terminal entrar na pasta criada
Instalar as dependências:
$ npm install
// Faz a instalação das dependências do Express e outros pacotes
Iniciar seu app Express.js, no endereço http://localhost:3000/
:
$ npm start
// Inicia o servidor para os primeiros testes
Opções da Linha de Comando
Este gerador também pode ser configurado com as seguintes opções da linha de comando.
--version exibe a versão do gerador
-i, --integrador adiciona os pacotes usados no projeto integrador
-v, --view <engine> adiciona suporte à engine <engine> (dust|ejs|hbs|hjs|jade|pug|twig|vash) (o padrão é PUG)
--no-view usa HTML estático ao invés de template engine
-c, --css <engine> adiciona suporte à engine CSS <engine> (less|stylus|compass|sass) (o padrão é CSS puro, texto plano)
--git adiciona .gitignore
--dotenv adiciona o pacote dotenv, para trabalhar com variáveis de ambiente. Chama automaticamente --git
-s, --silent executa instalação silenciosa (entra no diretório, instala as dependências e faz o primeiro commit)
-a, --api usar um template de web api sem uma view engine
-f, --force força a criação em diretórios não-vazios
-h, --help exibe informações de uso e ajuda