# todo-rest

> A todo web app

Latest version **1.0.0** (published 2023-07-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install todo-rest
pnpm add todo-rest
yarn add todo-rest
bun add todo-rest
```

## 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.0 |
| Published | 2023-07-09 |
| First published | 2023-07-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 12 |
| Unpacked size | 44.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | ginderick |

## Links

- npm: https://www.npmjs.com/package/todo-rest
- Repository: https://github.com/ginderick/todo-rest
- Homepage: https://github.com/ginderick/todo-rest#readme
- Issues: https://github.com/ginderick/todo-rest/issues
- npm.io page: https://npm.io/package/todo-rest

## Dependencies (12)

- [zod](https://npm.io/package/zod.md) ^3.21.4
- [bcrypt](https://npm.io/package/bcrypt.md) ^5.1.0
- [dotenv](https://npm.io/package/dotenv.md) ^16.0.3
- [typedi](https://npm.io/package/typedi.md) ^0.10.0
- [express](https://npm.io/package/express.md) ^4.18.2
- [date-fns](https://npm.io/package/date-fns.md) ^2.30.0
- [passport](https://npm.io/package/passport.md) ^0.6.0
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^9.0.0
- [passport-jwt](https://npm.io/package/passport-jwt.md) ^4.0.1
- [@prisma/client](https://npm.io/package/@prisma/client.md) ^4.14.1
- [passport-local](https://npm.io/package/passport-local.md) ^1.0.0
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.1.13

## Recent versions

- 1.0.0 (latest) — 2023-07-09

## README

# TODO Rest API

A todo app rest api using Node.js and Typescript

## Local

There are 2 ways to get a local development env running:

### Method 1: Install From Source

```
$ git clone https://github.com/ginderick/todo-rest.git
$ npm install
$ npx prisma migrate dev
$ npx prisma generate
$ npm run dev
```

> This installation method assumes that MySQL server is already running on your local machine and
> the .env DATABASE_URL was updated accordingly

### Method 2: Docker Compose

```
$ git clone https://github.com/ginderick/todo-rest.git
$ docker compose up --build -d
```

> If using docker compose, the servers will be available on the following ip:
>
> - Express server: http://172.21.0.2:{port}
> - MySQL server: http://172.21.0.3:3306

> Update the DATABASE_URL in the .env file accordingly

## Testing

```
$ npm run test
```

## Postman Collection

Postman collection is available as a published collection:

```
https://documenter.getpostman.com/view/15331816/2s93m4ZP9S#ba49026a-3e8b-475f-984c-8c9810073e46
```

and is also available in the /docs folder

## Built With

- [Express](https://expressjs.com/) - Node.js web application framework used
- [Zod](https://zod.dev/) - TypeScript-first schema validation with static type inference
- [Passportjs](https://www.passportjs.org/) - An authentication middleware
- [Typedi](https://github.com/typestack/typedi) - Dependency injection
- [Prisma](https://www.prisma.io/) - ORM and database migration tool
- [Jest](https://jestjs.io/) - Testing framework
- [Supertest](https://www.npmjs.com/package/supertest) - For http assertions

---
_Source: https://npm.io/package/todo-rest · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
