Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Wellers0n/Backend-diff

graphql vs rest
https://github.com/Wellers0n/Backend-diff

backend graphql rest rest-api

Last synced: 2 days ago
JSON representation

graphql vs rest

Awesome Lists containing this project

README

        





Backend-diff





## Backend-diff JS and TS

Backend-diff uses a stack full `JS/TS` on the backend, I'm making this project to improve
my skills in the backend.

## Initing in the your PC

- For clone the project `git clone https://github.com/Wellers0n/Backend-diff.git`
- Enter in the folder `cd Backend-diff/`
- To install project dependency: `yarn install`
- After the installation of the dependencies `yarn start` in the default directory

## Routes

#### Login and create user
- `POST` => `/api/login` return -> `TOKEN`
- `POST` => `/api/createUser` return -> `status 200`

#### Articles
- `GET` => `/api/articles` return -> `json articles`
- `GET` => `/api/article/:id` return -> `json one article`
- `POST` => `/api/article` return -> `status 200 = create one article`
- `DELETE` => `/api/article/:id` return -> `status 200 = delete one article`
- `PUT` => `/api/article/:id` return -> `status 200 = update one article`

#### Comments
- `GET` => `/api/comment/:idArticle` return -> `json comments of an article`
- `POST` => `/api/comment` return -> `status 200 = create one comments`
- `DELETE` => `/api/comment/:id` return -> `status 200 = delete one article`
- `PUT` => `/api/comment` return -> `status 200 = update one article`

## Stack used

[NodeJS](https://nodejs.org/en/)

[KoaJS](https://koajs.com/)

[MongoDB](https://www.mongodb.com/)

[GraphQL](https://graphql.org/)

[Yarn](https://yarnpkg.com/en/)

[WorkSpaces](https://yarnpkg.com/lang/en/docs/workspaces/)

## Profile
@nandosangenetto