{"id":13317098,"url":"https://github.com/patrickvaler/es6-express-mongoose-starter","last_synced_at":"2025-09-01T18:41:10.374Z","repository":{"id":208712422,"uuid":"90394719","full_name":"patrickvaler/es6-express-mongoose-starter","owner":"patrickvaler","description":"🔥 A Node.js starter package for Express and Mongoose written in ES6. Example REST API based on Express connected to a MongoDB instance by Mongoose.","archived":false,"fork":false,"pushed_at":"2018-08-09T21:36:43.000Z","size":54,"stargazers_count":13,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-28T12:30:08.704Z","etag":null,"topics":["chai","es6","express","mocha","mongodb","mongoose","nodjs","rest-api","starter","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patrickvaler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-05-05T16:14:03.000Z","updated_at":"2023-07-23T21:01:25.000Z","dependencies_parsed_at":"2023-11-22T22:46:28.082Z","dependency_job_id":null,"html_url":"https://github.com/patrickvaler/es6-express-mongoose-starter","commit_stats":null,"previous_names":["patrickvaler/es6-express-mongoose-starter"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/patrickvaler/es6-express-mongoose-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickvaler%2Fes6-express-mongoose-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickvaler%2Fes6-express-mongoose-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickvaler%2Fes6-express-mongoose-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickvaler%2Fes6-express-mongoose-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickvaler","download_url":"https://codeload.github.com/patrickvaler/es6-express-mongoose-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickvaler%2Fes6-express-mongoose-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273174502,"owners_count":25058469,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chai","es6","express","mocha","mongodb","mongoose","nodjs","rest-api","starter","starter-kit"],"created_at":"2024-07-29T18:24:33.368Z","updated_at":"2025-09-01T18:41:10.357Z","avatar_url":"https://github.com/patrickvaler.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/patrickvaler/es6-express-mongoose-starter.svg?branch=master)](https://travis-ci.org/patrickvaler/es6-express-mongoose-starter) [![Dependency Status](https://david-dm.org/patrickvaler/es6-express-mongoose-starter/status.svg?style=flat)](https://david-dm.org/patrickvaler/es6-express-mongoose-starter) [![GitHub version](https://badge.fury.io/gh/patrickvaler%2Fes6-express-mongoose-starter.svg)](https://badge.fury.io/gh/patrickvaler%2Fes6-express-mongoose-starter)\n\n\n# es6-express-mongoose-starter \nThis repo serves as an starter package written in JavaScript (ES6) for anyone looking to get up and running with Express and Mongoose fast. It contains a example REST API for fictious todos connected to MongoDB and uses [Mocha](\"https://mochajs.org/\")/[Chai](\"http://chaijs.com/\") for the unit tests.\n\n- Best practices in file and application organization\n- Ready to go build system for working with ES6\n- Uses [Eslint](\"http://eslint.org/\") for code linting\n- Example of REST API connected to MongoDB (by Mongoose)\n- Example unit tests created with [Mocha](\"https://mochajs.org/\")/[Chai](\"http://chaijs.com/\") and [Mockgoose](\"https://github.com/mockgoose/mockgoose\")\n\n## Getting Started\n\n### Requirements\n- [Node.js](\"https://nodejs.org/\") \u003e= 6.x\n- [MongoDB](\"https://docs.mongodb.com/manual/installation/\")\n\n### Clone project \u0026 install dependencies\n```bash\n$ git clone git://github.com/patrickvaler/es6-express-mongoose-starter ./my-example-app\n$ cd my-example-app\n\n$ yarn install\n  OR\n$ npm install\n```\n\n### Initialize MongoDB with data\n\u003e The server tries to connect with `'mongodb://localhost:27017/es6-express-mongoose-starter'`, you can overwrite this default setting for each environment in `src/config/config.js`.\n\nConnect to your MongoDB instance and insert:\n```bash\n$ use es6-express-mongoose-starter\n$ db.todos.insert([{ name: 'Book flight to Los Angeles' },\n                   { name: 'Reserve a table at a chinese restaurant' },\n                   { name: 'Buy birthday present for Tom' },\n                   { name: 'Book flight to Los Angeles' }]);\n```\n\n### Run backend\n```bash\n$ npm run serve\n```\nRuns the application with [nodemon](\"https://nodemon.io/\"). Server is listening on Port 3000 by default, you can overwrite this default setting for each environment in `src/config/config.js`\n\nTest if the backend is running by `curl` or a tool like [Postman](\"https://www.getpostman.com/\"):\n```bash\n$ curl localhost:3000/api/v1\n```\nIt should return the current version of the package.json file.\n\n\u003e All available routes of this starter package can be found [below](#availableRoutes) or in `src/config/routes.js`.\n\n## Additional information\n### \u003ca name=\"availableRoutes\"\u003eAvailable routes\u003c/a\u003e\n\n**Get a list of Todos**\n```\nGET localhost:3000/api/v1/todo\n```\n\n**Add a Todo**\n```\nPOST localhost:3000/api/v1/todo\n\nBody: {\n    name: String\n}\n```\n\n**Update a Todo**\n```\nPUT localhost:3000/api/v1/todo/:id\n\nBody: {\n    name: String\n}\n```\n\n**Delete a Todo**\n```\nDELETE localhost:3000/api/v1/todo/:id\n```\n\n### Scripts\n**Run for development**\n```bash\n$ npm run serve\n```\nRuns the application with [nodemon](\"https://nodemon.io/\"). Server is listening on Port 3000 by default, this can be overwritten by `API_PORT` constant in `src/config/config.js`. Application will automatically run babel and eslint and restart if a code change was detected.\n\n**Build**\n```bash\n$ npm run build\n```\nRuns eslint, transpiles the ES6 code and copies the transpiled code into build folder.\n\n**Test**\n```bash\n$ npm test\n```\nRuns eslint and verifies the unit tests from `test/` folder;\n\n### Eslint\n is pre-configured for this starter package. It uses the airbnb configuration package and a minimal set of own rules. Configuration is available in `.eslintrc.js`.\n\n### Unit-Tests\nA set of unit tests is available in `test/` folder. [Mocha](\"https://mochajs.org/\")/[Chai](\"http://chaijs.com/\") was used to create and run the unit tests.\n\n\n## License\n\n*The MIT License (MIT)*\n\nCopyright (c) 2017 Patrick Valer\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n---\nMade with ♥ by [Patrick Valer](\"http://www.patrickvaler.ch\") (\u003chello@patrickvaler.ch\u003e)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickvaler%2Fes6-express-mongoose-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickvaler%2Fes6-express-mongoose-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickvaler%2Fes6-express-mongoose-starter/lists"}