{"id":21418125,"url":"https://github.com/smoke-trees/nodejs-backend-template","last_synced_at":"2025-07-14T05:30:44.145Z","repository":{"id":40724025,"uuid":"248926612","full_name":"smoke-trees/nodejs-backend-template","owner":"smoke-trees","description":"Standardized template for SmokeTrees node.js projects.","archived":false,"fork":false,"pushed_at":"2023-01-24T02:00:26.000Z","size":1672,"stargazers_count":6,"open_issues_count":17,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-05T14:24:02.840Z","etag":null,"topics":["coverage","nodejs","template","testing"],"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/smoke-trees.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":"2020-03-21T07:20:28.000Z","updated_at":"2023-02-24T03:13:15.000Z","dependencies_parsed_at":"2023-02-13T10:45:35.177Z","dependency_job_id":null,"html_url":"https://github.com/smoke-trees/nodejs-backend-template","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/smoke-trees%2Fnodejs-backend-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoke-trees%2Fnodejs-backend-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoke-trees%2Fnodejs-backend-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoke-trees%2Fnodejs-backend-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smoke-trees","download_url":"https://codeload.github.com/smoke-trees/nodejs-backend-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225951408,"owners_count":17550383,"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":["coverage","nodejs","template","testing"],"created_at":"2024-11-22T19:19:07.319Z","updated_at":"2024-11-22T19:19:07.769Z","avatar_url":"https://github.com/smoke-trees.png","language":"JavaScript","readme":"# Template by SmokeTrees\n\nStandard template used at SmokeTrees for REST APIs written in NodeJS.\n\n[![codecov](https://codecov.io/gh/smoke-trees/nodejs-backend-template/branch/master/graph/badge.svg)](https://codecov.io/gh/smoke-trees/nodejs-backend-template)\n\n## Running the server\n\n```\n$ npm start\n```\n\nNote: This will run a server in the development environment.\nFor information on deploying an express application to production and learn best practices, take a look [here](https://expressjs.com/en/advanced/best-practice-performance.html).\n\n## Logging\n\nThis directory has 2 files.\n\n- `logger.js` exports a winston object which we use for logging. You should modify logger.js to customize your logging configuration.\n- `morgan.js` exports a pre-configured morgan object to write logs using a stream to winston. It is used to intercept http requests and log the request and response details.\n  For more details visit the official page for [morgan](https://www.npmjs.com/package/morgan).\n\n## Routes\n\nDirectory for defining routes. I don't think this needs more explanation.\n\n## Additional Information\n\n- On Linux, UNIX and Mac, running the following command adds ./node_modules/.bin to the path.\n\n  ```bash\n  source ./activate\n  ```\n\n  This makes it easier to run locally installed command packages.\n  This won't be required in many IDEs like Webstorm, but we thought it's a good idea to include it anyway.\n\n- [standard.js](https://npmjs.com/package/standard) has been added as the default linting and styling tool\n\n  Use :\n\n  ```bash\n  npm run lint\n  ```\n\n  Formats the entire project, and logs out anything it couldn't fix.\n\n- [mocha](https://npmjs.com/package/mocha) is used for testing and [chai](https://npmjs.com/package/chai) is used for assertion.\n  [chai-http](https://npmjs.com/package/chai) is used to test http endpoints.\n\n  Use:\n\n  ```bash\n  npm test\n  ```\n\n- [nyc](https://npmjs.com/package/nyc) is used as the default coverage tool.\n  Use:\n\n  ```bash\n  npm run coverage\n  ```\n\n* The master branch ships code for a **http** server. Checkout the **https** branch for the https server.\n  Replace the self-signed certificates in the certs with your own SSL certificates.\n\n## Dependencies\n\n| Dependency                                           | Usage                                                              |\n| ---------------------------------------------------- | ------------------------------------------------------------------ |\n| [body-parser](https://npm.com/package/body-parser)   | POST body parsing middleware. Adds body object to incoming request |\n| [compression](https://npmjs.com/package/compression) | Response compression middleware                                    |\n| [express](https://npmjs.com/package/express)         | Express REST API framework                                         |\n| [cors](https://npm.com/package/cors)                 | CORS middleware to set CORS policy                                 |\n| [morgan](https://npmjs.com/package/morgan)           | HTTP request logger                                                |\n| [winston](https://npmjs.com/package/winston)         | General purpose logger for the application                         |\n| [nyc](https://npmjs.com/package/nyc)                 | Code Coverage tool                                                 |\n| [standard](https://npmjs.com/package/standard)       | Linting and styling tool.                                          |\n| [chai](https://npmjs.com/package/chai)               | Assertion Library                                                  |\n| [chai-http](https://npmjs.com/package/chai-http)     | Middleware for chai to test http endpoints                         |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmoke-trees%2Fnodejs-backend-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmoke-trees%2Fnodejs-backend-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmoke-trees%2Fnodejs-backend-template/lists"}