{"id":20984840,"url":"https://github.com/kazordoon/nodejs-restful-api-express","last_synced_at":"2026-04-04T13:40:20.413Z","repository":{"id":42965049,"uuid":"224526015","full_name":"kazordoon/nodejs-restful-api-express","owner":"kazordoon","description":"RESTful API made with Node.js.","archived":false,"fork":false,"pushed_at":"2023-03-04T05:17:59.000Z","size":451,"stargazers_count":4,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-04T07:47:46.503Z","etag":null,"topics":["api","api-restful","express","javascript","mongodb","nodejs","npm","yarn"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kazordoon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-27T22:16:16.000Z","updated_at":"2023-03-04T07:47:46.503Z","dependencies_parsed_at":"2023-02-17T02:00:27.064Z","dependency_job_id":null,"html_url":"https://github.com/kazordoon/nodejs-restful-api-express","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazordoon%2Fnodejs-restful-api-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazordoon%2Fnodejs-restful-api-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazordoon%2Fnodejs-restful-api-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazordoon%2Fnodejs-restful-api-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kazordoon","download_url":"https://codeload.github.com/kazordoon/nodejs-restful-api-express/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225303579,"owners_count":17453029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-restful","express","javascript","mongodb","nodejs","npm","yarn"],"created_at":"2024-11-19T05:54:40.467Z","updated_at":"2026-04-04T13:40:20.382Z","avatar_url":"https://github.com/kazordoon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# nodejs-restful-api-express\n\nRESTful API made with Node.js where a registered user can list, create, update or delete courses that are stored in a database. It will be needed a token, which will be received when you log in.\n\n## Getting Started\n\n### Prerequisites\n\n- MongoDB\n- Redis\n- Node.js\n- NPM / Yarn\n\n### Installing\n\n- Clone the repository: `https://github.com/kazordoon/nodejs-restful-api-express.git`\n- Get in the project directory: `cd nodejs-restful-api-express`\n- Install the dependencies:\n\t- NPM: `npm i` | Remove the file `yarn.lock` before installing with NPM\n\t- Yarn: `yarn`\n\n### Setting environment variables\n\nCopy the `.env.example` file to the` .env`, then you will need to set the variable values into the `.env` file according to your environment.\n\n### Running the server\n\n* NPM: `npm run dev`\n* Yarn: `yarn dev`\n\n### API endpoints\n\n#### Users\nAction | Path | Body | Method | Returns\n------ | --- | ----- | ------ | -------\nCreate a new user | /auth/register | A JSON with these [fields](#user-fields) | POST | A JSON with a token\nLogin into an account | /auth/login | A JSON with these [fields](#user-fields) | POST | A JSON with a token\n\n#### Courses\nAction | Path | Parameters | Body | Method | Returns\n------ | --- | ---------- | ------ | ------- | -------\nList all courses | /courses | -- | -- | GET | All courses\nList one course | /courses/{id} | id | -- | GET | The course that has the same `id` as the one found in the `id` parameter\nCreate a new course | /courses | - | A JSON with these [fields](#course-fields) | POST | The created course\nUpdate an existing course | /courses/{id} | id | A JSON with at least one of these [fields](#course-fields) | PATCH | The updated course\nDelete a course | /courses/{id} | id | -- | DELETE | --\n\n### How to use the token\n\nYou need to put the token on the authorization header.\n\n`Authorization: Bearer \u003ctoken\u003e`\n\n### Input data validation\n\n#### user-fields\n\n- username\n\t- Type: string\n\t- Minimium characters: 3\n\t- Maximium characters: 20\n- password\n\t- Type: string\n\t- Minimium characters: 8\n\t- Maximium characters: 50\n\n#### course-fields\n\n- name:\n\t- Type: string\n\t- Minimium characters: 5\n\t- Maximium characters: 50\n- description\n\t- Type: string\n\t- Minimium characters: 15\n\t- Maximium characters: 100\n- workload\n\t- Type: number\n\t- Minimium: 1\n- total_classes\n\t- Type: number\n\t- Minimum: 1\n- year\n\t-  Type: number\n\t- Minimum: 1970\n\t- Maximum: \u003ccurrent_year\u003e\n\n## Examples\n\nSee the [EXAMPLES.md](EXAMPLES.md).\n\n## Built With\n\n* [Node.js](https://nodejs.org) - JavaScript runtime environment that executes JavaScript code server-side\n* [MongoDB](https://www.mongodb.com/) - NoSQL Database\n* [mongoose](https://mongoosejs.com) - MongoDB object modeling tool\n* [express](https://expressjs.com) - Minimalist web framework for Node.js\n* [consign](https://github.com/jarradseers/consign) - Autoload for the scripts\n* [cors](https://github.com/expressjs/cors) Node.js CORS middleware\n* [express-validator](https://express-validator.github.io/docs/) - Data input validator\n* [bcryptjs](https://github.com/dcodeIO/bcrypt.js) - A library to help you hash passwords\n* [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) - An implementation of JSON Web Tokens\n* [ioredis](https://github.com/luin/ioredis) - A robust, performance-focused and full-featured Redis client for Node.js\n\n## Versioning\n\nFor the versions available, see the [tags on this repository](https://github.com/kazordoon/nodejs-restful-api-express/tags). \n\n## Authors\n\n* **Felipe Barros** - *Initial work* - [kazordoon](https://github.com/kazordoon)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazordoon%2Fnodejs-restful-api-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkazordoon%2Fnodejs-restful-api-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazordoon%2Fnodejs-restful-api-express/lists"}