2.2.9 • Published 3 years ago

create-express-typescript-application v2.2.9

Weekly downloads
38
License
MIT
Repository
github
Last release
3 years ago

create-express-typescript-application.

Wallaby.js

Why create-express-typescript-application?

create-express-typescript-application creates a new lightweight express application which is fully customizable for your use case. With the support of TypeScript, it allows a robust NodeJS express app to serve as an RESTful backend server.

There are three modes of create-express-typescript-application, mainly: 1. plain mode - lightweight express typescript app (--type plain) 2. typeorm mode - lightweight express typescript app with typeorm (sqlite included) and swagger (OpenAPI documentation) integrated 3. prisma mode - fullweight express typescript app with prisma (relational database ORM) and swagger (OpenAPI documentation) integrated

You are highly recommended to use typeorm template if database is required in this project, otherwise, plain mode.

Application Details

When you run create-express-typescript-application, it sets up a very simple application without junk packages. The src/app/sample folder shows how easy it is to create new routes.

Installation

Pre-requisite: Node, npm and git are locally installed.

$ Just use 'npx'
  Or
$ npm install -g create-express-typescript-application
$ create-express-typescript-application {project-name-without-spaces}
# example (plain lightweight) $ create-express-typescript-application {project-name-without-spaces} -t plain
# example (typeorm lightweight) $ create-express-typescript-application {project-name-without-spaces} -t typeorm
# example (prisma fullweight) $ create-express-typescript-application {project-name-without-spaces} -t prisma

Quick Start

The quickest way to get started is use npx and pass in the name of the project you want to create. It is invalid to exclude project name.

Create the app:

$ npx create-express-typescript-application {project-name-without-spaces}

Start your express-app in development mode at http://localhost:8080/

$ cd "project name" && npm run dev

If swagger is included, you can view the swagger file at http://localhost:8080/docs

Or build your application and serve it.

$ cd "project name" && npm run build && npm start

List of options.

Options: -V, --version output the version number -d, --debug output extra debugging -t, --template specify only prisma or plain or typeorm -p, --prisma define type prisma -y, --typeorm define type typeorm -h, --help display help for command

Prisma options integrates prisma ORM into the lightweight express typescript app.

Available commands for the server.

  • Run the server in development mode: npm run dev.
  • Build the project for production: npm run build.
  • Run the production build: npm start.

License

MIT

2.2.9

3 years ago

2.2.7

3 years ago

2.2.3

3 years ago

2.2.5

3 years ago

2.2.4

3 years ago

2.2.6

3 years ago

2.2.1

3 years ago

2.2.2

3 years ago

2.1.2

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.6

3 years ago

2.1.5

3 years ago

2.1.7

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago