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

https://github.com/yhyasyrian/tawasol-server

This is a simple project to handle node.js and mongoose-type databases
https://github.com/yhyasyrian/tawasol-server

express express-middleware jwt jwt-authentication nodejs restful-api

Last synced: 2 months ago
JSON representation

This is a simple project to handle node.js and mongoose-type databases

Awesome Lists containing this project

README

        

# tawasol-server

This is a simple project to handle node.js and mongoose-type databases

The project is simple API, you can test and learn how create API with node.js from this repository

## Route

You can test with postman after import file: `./Routes/tawasol.postman_collection.json` or continue with me

### api/users

GET /

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

POST /login

##### Body

> | name | type | data type | description |
> | -------- | -------- | --------- | ----------- |
> | email | required | string | N/A |
> | password | required | string | N/A |

POST /register

##### Body

> | name | type | data type | description |
> | -------- | -------- | --------- | ----------- |
> | email | required | string | N/A |
> | password | required | string | N/A |

### api/profiles

GET /

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

GET /me

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

GET /{userId}

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

POST /

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

##### Body

> | name | type | data type | description |
> | ---------- | -------- | ------------------------------------------------------------------ | ---------------- |
> | status | required | string | status user |
> | company | required | string | name company |
> | website | required | string | website |
> | country | required | string | name country |
> | location | required | string | location |
> | bio | required | string | bio |
> | skills | required | array[string] | skills |
> | experience | required | array[{title,company,location,from:date,current:bool,description}] | experiences user |
> | education | required | array[{school,degree,from:date,current:bool,description}] | education user |
> | github | required | string | Social Media |
> | youtube | required | string | Social Media |
> | facebook | required | string | Social Media |
> | instagram | required | string | Social Media |
> | linkedin | required | string | Social Media |

POST /experience

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

##### Body

> | name | type | data type | description |
> | ------- | -------- | --------- | --------------------- |
> | title | required | string | title experience |
> | company | required | string | name company |
> | from | required | date | date start experience |

POST /education

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

##### Body

> | name | type | data type | description |
> | ------ | -------- | --------- | -------------------- |
> | title | required | string | title education |
> | degree | required | string | degree education |
> | from | required | date | date start education |

DELETE /{userId}

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

DELETE /{userId}/experience

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

DELETE /

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

### api/posts

GET /

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

GET /{userId}

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

POST /

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

##### Body

> | name | type | data type | description |
> | ---- | -------- | --------- | ----------- |
> | text | required | string | text post |

POST /comment/{postId}

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

##### Body

> | name | type | data type | description |
> | ---- | -------- | --------- | ------------ |
> | text | required | string | text comment |

PUT /like/{postId}

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

PUT /unlike/{postId}

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

DELETE /comment/{postId}/{userId}

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

DELETE /{postId}

##### Headers

> | name | type | data type | description |
> | ------------ | -------- | --------- | ------------------------- |
> | x-auth-token | required | string | Token account after login |

## Contributing
Contributions are welcome!