{"id":20364708,"url":"https://github.com/emnetdegafe/cool-bro-server","last_synced_at":"2026-06-07T11:31:55.397Z","repository":{"id":42256788,"uuid":"277495687","full_name":"Emnetdegafe/cool-bro-server","owner":"Emnetdegafe","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-22T17:20:25.000Z","size":458,"stargazers_count":0,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T18:46:16.950Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Emnetdegafe.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}},"created_at":"2020-07-06T09:14:08.000Z","updated_at":"2020-07-06T09:14:12.000Z","dependencies_parsed_at":"2023-01-30T15:00:49.397Z","dependency_job_id":null,"html_url":"https://github.com/Emnetdegafe/cool-bro-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"Codaisseur/express-template","purl":"pkg:github/Emnetdegafe/cool-bro-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emnetdegafe%2Fcool-bro-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emnetdegafe%2Fcool-bro-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emnetdegafe%2Fcool-bro-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emnetdegafe%2Fcool-bro-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Emnetdegafe","download_url":"https://codeload.github.com/Emnetdegafe/cool-bro-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emnetdegafe%2Fcool-bro-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34020187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"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":[],"created_at":"2024-11-15T00:13:07.662Z","updated_at":"2026-06-07T11:31:55.374Z","avatar_url":"https://github.com/Emnetdegafe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Server template\n\nThis is a simple server template to for my students to start projects quickly.\n\n## Table of contents:\n\n- **[Setup](#setup-how-to-use-this-template)**\n- **[Endpoints](#endpoints)**\n- **[Sample requests with axios](#sample-requests-with-axios)**\n- **[Sample requests with httpie](#sample-requests-with-httpie)**\n- **[History of this project (pullrequests)](#history-of-this-project)**\n\n## SETUP How to use this template\n\n1. Create a new project based on this template using the `Use this template` button\n\n![HOW_TO_USE](https://user-images.githubusercontent.com/20372832/77003323-70966180-695d-11ea-8abe-b362d57135f3.gif)\n\n2. Clone the app\n\n```\ngit clone git@github.com:YOUR_GITHUB_NAME/YOUR_PROJECT_NAME.git\n```\n\n3. cd into your project\n\n```\ncd YOUR_PROJECT_NAME\n```\n\n4. install dependencies\n\n```\nnpm install\n```\n\n5. Configure your database in `config/config.json`\n\nDefault config is setup for usage with an ElephantSQL database instance, you need to provide the DB Url on the \"url\" key of the config.json file, key development.\n\n```json\n// config/config.json\n{\n  \"development\": {\n    \"url\": \"YOUR_ELEPHANTSQL_URL_HERE\",\n    \"dialect\": \"postgres\",\n    \"operatorsAliases\": \"0\"\n  },\n}\n```\n\n\nIf planning to use this template with a docker database the config object should be changed to:\n\n```json\n// config/config.json\n{\n  \"development\": {\n    \"username\": \"postgres\",\n    \"password\": \"secret\",\n    \"database\": \"YOUR_PROJECT_NAME_HERE_development\",\n    \"host\": \"localhost\",\n    \"dialect\": \"postgres\",\n    \"operatorsAliases\": \"0\"\n  }\n}\n```\n\nAnd you must revert the changes on this line in models/index.js: https://github.com/Codaisseur/express-template/commit/ada7711c8b19c8f240bc61f94743213efe4a77d2#diff-18c449caa39363f82bacb4f7489e7783L15\n\n\n6. Create database, run migrations \u0026 seed data\n\n`package.json` contains a script for this\n\n```bash\nnpm run initdev\n```\n\nOr run the commands seperately\n\n```bash\nnpx sequelize-cli db:create\nnpx sequelize-cli db:migrate\nnpx sequelize-cli db:seed:all\n```\n\n7. start server with `nodemon` (recommended for development)\n\n```\nnpm run dev\n```\n\n8. or start normally\n\n```\nnpm start\n```\n\n## Endpoints\n\n| Method | Path                       | Purpose                             | required parameters   | auth |\n| ------ | -------------------------- | ----------------------------------- | --------------------- | ---- |\n| GET    | '/'                        | Test if your server is running      | none                  | no   |\n| POST   | '/echo'                    | Test POST requests                  | none                  | no   |\n| POST   | '/signup'                  | Create a new user and get a token   | email, name, password | no   |\n| POST   | '/login'                   | Get a token with email \u0026 password   | email, password       | no   |\n| GET    | '/me'                      | Get information of this user        | none                  | yes  |\n| POST   | '/authorized_post_request' | Test POST requests (token required) | none                  | yes  |\n\n## Sample requests with axios\n\nTo demo making request to this server, some small script are included that make requests using `axios`\n\nThe scripts can be found in [/sampleRequests](./sampleRequests)\n\n1. Make sure to follow the the setup in this readme first\n2. cd sampleRequests\n3. Run example requests\n\n```\nnode hello.js\nnode echo.js\nnode signup.js\nnode login.js\nnode me.js\nnode authorizedPost.js\n```\n\n## Sample requests with httpie\n\nTo demo making request to this server, bash commands are included that make requests using `httpie`\n\nThey can found in [./sampleRequests/httpie.md](./sampleRequests/httpie.md)\n\n## History of this project\n\n- [Setup of the server](https://github.com/Codaisseur/express-template/commit/cd2f790fbab6c561300163466a074fd09a35f704)\n- [Adding a README](https://github.com/Codaisseur/express-template/pull/1)\n- [Setting up the Database](https://github.com/Codaisseur/express-template/pull/2)\n- [Signup, Login \u0026 auth middleware](https://github.com/Codaisseur/express-template/pull/3)\n- [Configure cors](https://github.com/Codaisseur/express-template/pull/4)\n- [Seed using models \u0026 add delay middleware](https://github.com/Codaisseur/express-template/pull/5)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femnetdegafe%2Fcool-bro-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femnetdegafe%2Fcool-bro-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femnetdegafe%2Fcool-bro-server/lists"}