{"id":20364687,"url":"https://github.com/emnetdegafe/flashcard-app-backend","last_synced_at":"2026-04-09T20:04:04.584Z","repository":{"id":42248215,"uuid":"284964555","full_name":"Emnetdegafe/flashCard-App-backend","owner":"Emnetdegafe","description":"This is a repository with the backend - server for the flashCardApp project, a collaborative work we did as a following Codaissuer's 11 weeks full-stack web development program. ","archived":false,"fork":false,"pushed_at":"2022-12-22T18:03:35.000Z","size":110,"stargazers_count":3,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"development","last_synced_at":"2025-01-15T04:29:00.282Z","etag":null,"topics":["authentication","axios","database","express","httpie","middleware","postgresql","router","sequelize-orm"],"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/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-08-04T11:53:59.000Z","updated_at":"2020-09-17T10:35:20.000Z","dependencies_parsed_at":"2023-01-30T15:46:08.947Z","dependency_job_id":null,"html_url":"https://github.com/Emnetdegafe/flashCard-App-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"Codaisseur/express-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emnetdegafe%2FflashCard-App-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emnetdegafe%2FflashCard-App-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emnetdegafe%2FflashCard-App-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emnetdegafe%2FflashCard-App-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Emnetdegafe","download_url":"https://codeload.github.com/Emnetdegafe/flashCard-App-backend/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241904705,"owners_count":20040021,"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":["authentication","axios","database","express","httpie","middleware","postgresql","router","sequelize-orm"],"created_at":"2024-11-15T00:13:02.244Z","updated_at":"2026-04-09T20:04:04.552Z","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: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%2Fflashcard-app-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femnetdegafe%2Fflashcard-app-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femnetdegafe%2Fflashcard-app-backend/lists"}