Socket
Book a DemoInstallSign in
Socket

create-express-app

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-express-app

Scaffold an express app

latest
Source
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

Scaffold an Express App

Scaffold out an Express app.

Usage

$ npm init express-app
$ npmx create-express-app

With npm@6 this will run this package with npx. If you are on an earlier version of npm you will need to install globally and run directly:

$ npm install -g create-express-app
$ create-express-app

CLI Usage

$ create-express-app --help

Usage: create-express-app [options] <directory>

Options:
  -V, --version                      output the version number
  --extended                         Show extended option prompts (ex. browser, engines, etc)
  --force                            Force overwrite files
  --no-prompt                        Skip prompts and just use input options
  --name [name]                      The package name
  --app-type [type]                  The app type, determines template and defaults
  --view-engine [type]               The view engine to use (default ejs)
  --body-parser                      Install and use the body-parser package
  --consolidate                      Install and use the consolidate package
  --cookie-parser                    Install and use the cookie-parser package
  --serve-static                     Install and use the serve-static package
  --pino                             Install and use the pino for loggin (pino, pino-http, pino-pretty)
  --dependencies [dependencies]      Package dependencies
  --dev-dependencies [dependencies]  Package dev dependencies
  --main [main]                      The app main entry script
  -h, --help                         output usage information

Programmatic Usage

const createExpressApp = require('create-express-app')

(async () => {
  // Will create an express app in the current directoy
  await createExpressApp({
    noPrompt: false,
    extended: false,
    silent: false,
    name: 'my-app'
    directory: process.cwd(),
    appType: 'bare',
    viewEngine: 'ejs',
    bodyParser: false,
    consolidate: false,
    cookieParser: false,
    serveStatic: false,
    pino: true,
    dependencies: [],
    devDependencies: [],
    main: 'index.js'
  })
})()

After that you should be able to start with running:

$ npm run start

Keywords

express

FAQs

Package last updated on 02 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts