Skip to content

Commit

Permalink
📚 new documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fischettij committed Nov 26, 2020
1 parent c6cbe62 commit 2320d99
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ cd pixowlgram
docker-compose up
```

_configure .env or keep docker-compose default values to easy startup_

## Install & Run

### Download
Expand Down Expand Up @@ -47,6 +49,11 @@ npx sequelize db:migrate
npm run start
```

## Docs

- [API Changelog](docs/API-Changelog.md)
- [Technologies](docs/Technologies.md)

### TODO

- Token expires
Expand Down
11 changes: 11 additions & 0 deletions docs/API-Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# API Changelog

## 2020-11-25 » v1.0.0

| Method | Path | Token | Descripción |
| ------ | ---------- | ----- | -------------------- |
| `POST` | `/posts` | ✔️ | Create new post |
| `GET` | `/posts` | ✔️ | Get posts |
| `POST` | `/users` | ❌️ | Register new user |
| `POST` | `/session` | ❌️ | Crete new user token |
| `POST` | `/upload` | ✔️ | Upload image |
22 changes: 22 additions & 0 deletions docs/Technologies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Technologies

## Node dependencies

- bcrypt: For encipt and compare user password.
- cors: Enable cors for browsers (configured for any domain)
- dotenv: Manage many .env files.
- express: Web server.
- express-paginate: Parse query parameters to paginate responses.
- express-routes: Print routes un development mode.
- express-validator: Requests validations middelware.
- http-status-codes: Constants enumerating the HTTP status codes.
- jsonwebtoken: Sign and verify tokens.
- morgan: Logger.
- multer: Used for upload images.
- sequelize: SQL ORM (postgres in production, sqlite in dev and memory for tests)

## Database

For this MVP use SQL databases.
Choosed SQL for my knowledge with this paradigm and my experience using sequelize (SQL ORM).
I would have preferred to use MongoDB (or some other document database) to exploit horizontal scale and faster access times.Don't use mongo because of the times I had available to perform the MVP

0 comments on commit 2320d99

Please sign in to comment.