# @chatpta/starter-api-express

> Chatpta express starter api

Latest version **1.0.5** (published 2021-11-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install @chatpta/starter-api-express
pnpm add @chatpta/starter-api-express
yarn add @chatpta/starter-api-express
bun add @chatpta/starter-api-express
```

Provides the command `create-express-api`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2021-11-15 |
| First published | 2021-11-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Chatpta team |
| Maintainers | chatpta |
| Keywords | chatpta, express, js, javascript, starter api |

## Links

- npm: https://www.npmjs.com/package/@chatpta/starter-api-express
- Repository: https://github.com/chatpta/starter-api-express
- Homepage: https://github.com/chatpta/starter-api-express#readme
- Issues: https://github.com/chatpta/starter-api-express/issues
- npm.io page: https://npm.io/package/@chatpta/starter-api-express

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.5 (latest) — 2021-11-15
- 1.0.4 — 2021-11-15
- 1.0.3 — 2021-11-15
- 1.0.2 — 2021-11-15
- 1.0.1 — 2021-11-15

## README

### Express starter api application serves JSON

Create express api application

```shell
npx @chatpta/starter-api-express my-api
```

To run application in docker compose,

Express runs at localhost:3000 and postgres runs at localhost:5432

```shell
docker-compose -f docker-compose.yaml up
```

Start postgres database in container, available at host port 5432

```shell
docker-compose up db-starter-api-express
```

Test connection to db

```shell
psql "postgresql://user:password@localhost/chatpta_db"
```

Run application

```shell
 npm install
 npm run devstart
```

Run test in watch mode with postgres db connection

```shell
 npm run test
```

Run test in watch mode WITHOUT postgres db connection

```shell
 npm run testWithoutDb
```

Run the build script to do all of above

```shell
 ./build
```

Run database migration to create database tables

```shell
 npm run migrateDb
```

---
_Source: https://npm.io/package/@chatpta/starter-api-express · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
