{"id":15478329,"url":"https://github.com/okmttdhr/express-rest-api-2018","last_synced_at":"2026-05-05T13:40:02.783Z","repository":{"id":85850728,"uuid":"135133566","full_name":"okmttdhr/express-rest-api-2018","owner":"okmttdhr","description":"Boilerplate/Starter Project for building RESTful API using Node.js, Express and Sequelize.","archived":false,"fork":false,"pushed_at":"2018-06-09T00:54:55.000Z","size":83,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T03:21:36.754Z","etag":null,"topics":["boilerplate","docker","ecmascript2015","ecmascript2017","ecmascript2018","express","flow","javascript","nodejs","rest-api","sequelize","starter-kit"],"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/okmttdhr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-28T08:39:22.000Z","updated_at":"2019-09-03T05:55:44.000Z","dependencies_parsed_at":"2023-03-06T20:45:49.040Z","dependency_job_id":null,"html_url":"https://github.com/okmttdhr/express-rest-api-2018","commit_stats":{"total_commits":29,"total_committers":1,"mean_commits":29.0,"dds":0.0,"last_synced_commit":"4a34e99309856ff6740ce38a296424adaf13e2ee"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okmttdhr%2Fexpress-rest-api-2018","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okmttdhr%2Fexpress-rest-api-2018/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okmttdhr%2Fexpress-rest-api-2018/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okmttdhr%2Fexpress-rest-api-2018/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okmttdhr","download_url":"https://codeload.github.com/okmttdhr/express-rest-api-2018/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246042013,"owners_count":20714147,"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":["boilerplate","docker","ecmascript2015","ecmascript2017","ecmascript2018","express","flow","javascript","nodejs","rest-api","sequelize","starter-kit"],"created_at":"2024-10-02T04:03:27.270Z","updated_at":"2026-05-05T13:39:57.762Z","avatar_url":"https://github.com/okmttdhr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Express Rest API 2018\n\nBoilerplate/Starter Project for building RESTful API using Node.js, Express and Sequelize.\n\n(Influenced by [express-rest-es2017-boilerplate](https://github.com/danielfsousa/express-rest-es2017-boilerplate)).\n\n## Features\n\n- [Node v8.9.4](https://nodejs.org/en/)\n- [Express](http://expressjs.com/)\n- [Docker](https://www.docker.com/)\n- [Yarn](https://yarnpkg.com/en/)\n- [Babel](https://babeljs.io/)\n- [Flow](https://flow.org/)\n- [MySQL](https://www.mysql.com/)\n- [Sequelize](http://docs.sequelizejs.com/)\n- Testing\n  - [Mocha](https://mochajs.org/)\n  - [supertest](https://github.com/visionmedia/supertest)\n  - [ESLint](https://eslint.org/)\n- ES2017 support\n- Load environment variables from .env files with [dotenv](https://github.com/motdotla/dotenv)\n- Request validation with [express-validator](https://github.com/express-validator/express-validator)\n- Logging with [morgan](https://github.com/expressjs/morgan)\n\n## Pre Requirements\n\n- [Docker For Mac](https://www.docker.com/docker-mac)\n- [Yarn](https://yarnpkg.com/en/)\n\n## Getting Started\n\n```bash\n$ git clone https://github.com/okmttdhr/express-rest-api-2018.git\n$ cd express-resr-api-2018\n```\n\n```bash\n$ cp .env.sample .env\n```\n\n```bash\n$ yarn docker:build\n$ yarn docker:dev\n```\n\nNow your app is running.\n\n```bash\n$ curl -X POST -H 'Content-Type:application/json' -d '{\"title\": \"ttttt\", \"body\": \"bbbbb\"}' http://localhost/posts\n{\"message\":\"OK\",\"id\":1}\n```\n\n```bash\n$ curl -H 'Content-Type:application/json' -X GET http://localhost/posts\n{\"posts\":[{\"id\":1,\"title\":\"ttttt\",\"body\":\"bbbbb\",\"created_at\":\"2018-06-09T00:43:21.000Z\",\"updated_at\":\"2018-06-09T00:43:21.000Z\"}],\"total_count\":1,\"current_page\":1,\"total_page\":1}\n```\n\n## Testing\n\nRun migration if you haven't yet.\n\n```bash\n$ docker exec -it expressrestapi2018_app_1 /bin/bash\nroot@id:/app# NODE_ENV=test yarn db db:migrate\n```\n\nAll the test's command here.\n\n```bash\n$ docker exec -it expressrestapi2018_app_1 /bin/bash\n# all the tests\nroot:/app# yarn test\n# all the unit tests\nroot:/app# yarn test:unit\n# only target file's test\nroot:/app# yarn test:unit:target ./path/to/file.js\n# only target file's test with Node debugging client\nroot:/app# yarn test:unit:target debug ./path/to/file.js\n# linting\nroot:/app# yarn test:lint\n# flow\nroot:/app# yarn flow\n```\n\n## Database\n\n### Connect to MySQL\n\n```bash\n$ docker exec -it expressrestapi2018_db_1 /bin/bash\nroot@id:/\\# mysql -u root -pdocker\nmysql\u003e show databases;\n+-----------------------------------+\n| Database                          |\n+-----------------------------------+\n| information_schema                |\n| express_rest_api_2018_development |\n| express_rest_api_2018_test        |\n| mysql                             |\n| performance_schema                |\n+-----------------------------------+\n4 rows in set (0.00 sec)\n```\n\n### Creating Model and Migration\n\n- [Creating first Model (and Migration)](http://docs.sequelizejs.com/manual/tutorial/migrations.html#creating-first-model-and-migration-)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokmttdhr%2Fexpress-rest-api-2018","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokmttdhr%2Fexpress-rest-api-2018","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokmttdhr%2Fexpress-rest-api-2018/lists"}