https://github.com/protontype/protontype-sequelize-example
Example how to use Protontype API with Sequelize ORM
https://github.com/protontype/protontype-sequelize-example
protontype protontype-sequelize rest-api typescript
Last synced: 9 months ago
JSON representation
Example how to use Protontype API with Sequelize ORM
- Host: GitHub
- URL: https://github.com/protontype/protontype-sequelize-example
- Owner: protontype
- Created: 2016-08-17T01:17:19.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-05-10T10:45:06.000Z (about 8 years ago)
- Last Synced: 2025-07-27T00:16:03.089Z (11 months ago)
- Topics: protontype, protontype-sequelize, rest-api, typescript
- Language: TypeScript
- Homepage:
- Size: 60.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [Protontype Framework](https://github.com/protontype/protontype) example using [protontype-sequelize](https://github.com/protontype/protontype-sequelize) module
## Run example
- open terminal
- git clone https://github.com/protontype/protontype-sequelize-sample.git
- npm install
- npm run build
- npm start
### Endpoints availables
#### GET Method
- http://localhost:3000/tasks (List all tasks)
- http://localhost:3000/tasks/:id (Get task by id)
- http://localhost:3000/users (List all users)
- http://localhost:3000/users/:id (Get user by id)
#### POST Method
- http://localhost:3000/tasks (Creates task)
- http://localhost:3000/users (Creates user)
#### DELETE Method
- http://localhost:3000/tasks/:id (Remove task)
- http://localhost:3000/users/:id (Remove user)
#### PUT Method
- http://localhost:3000/tasks/:id (Update task)
- http://localhost:3000/users/:id (Update user)
### Request body
#### Tasks
```json
{
"title": "Make something",
"done": false,
"userId": 1
}
```
#### Users
```json
{
"name": "Bob",
"password": "123456",
"email": "bob@mail.com"
}
```
## Development environment (linked module)
**Cloning ProtonType module**
- git clone https://github.com/protontype/protontype.git
- npm install
- npm link
**Cloning and install example**
- git clone https://github.com/protontype/protontype-sequelize-sample.git
- npm install
- npm link protontype
- tsc
- npm start
## Requirements
NodeJS 6.x or later