{"id":19766246,"url":"https://github.com/akaliutau/cs-anki-cards","last_synced_at":"2026-05-10T12:17:46.771Z","repository":{"id":120055951,"uuid":"323994232","full_name":"akaliutau/cs-anki-cards","owner":"akaliutau","description":"A deck of CS Anki Cards implemented in Angular 11","archived":false,"fork":false,"pushed_at":"2020-12-26T12:39:09.000Z","size":546,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-11T00:13:32.916Z","etag":null,"topics":["angular","computer-science"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/akaliutau.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":"2020-12-23T20:19:34.000Z","updated_at":"2020-12-26T12:39:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"c437c8a4-605a-4d9a-bd01-28fa2d922bd6","html_url":"https://github.com/akaliutau/cs-anki-cards","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fcs-anki-cards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fcs-anki-cards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fcs-anki-cards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fcs-anki-cards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akaliutau","download_url":"https://codeload.github.com/akaliutau/cs-anki-cards/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241099624,"owners_count":19909577,"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":["angular","computer-science"],"created_at":"2024-11-12T04:23:32.443Z","updated_at":"2026-05-10T12:17:46.705Z","avatar_url":"https://github.com/akaliutau.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About CS Anki Cards\n\nThe aim of this project is to create a simple deck of anki cards on different topics in Computer Science. Currently 18 topics are covered, ranging from CS fundamentals till REST architecture and OOD. \n\nAlso this is a good chance to show up opportunities proposed by Angular framework in terms of intuitive UI and usability.\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.0.5.\n\nYou can see the app in action on Heroku:\n\n[https://cs-anki-cards.herokuapp.com/about](https://cs-anki-cards.herokuapp.com/about)\n\n\nThis project is intended to deploy to production, for development purposes change the start script reference in package.json to ng start:\n\n```\n\"scripts\": {\n    \"start\": \"ng start\",\n}\n```\n\n## Development\n\nHere are all initial steps to generate the skeleton of Angular project with Material Design styling:\n\n1) IDEA -\u003e new project -\u003e static web -\u003e angular cli\n\n2) ng add @angular/material\n\n3) use arrows to choose theme\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n## Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. So the final command will look like\n\n```\nng build --prod (run in command line when directory is projectFolder)\n```\n\n## Production Build for Heroku\n\nIt will be necessary to make some changes into configuration in order to successfully deploy project to Heroku.\n\n1) Create postinstall script in package.json: \nUnder \"scripts\", add a \"heroku-postinstall\" command like so:\n\n```\n\"heroku-postbuild\": \"ng build --prod\"\n```\n\nThis tells Heroku to build the application using Ahead Of Time (AOT) compiler and make it production-ready. This will create a dist folder where all html and javascript converted version of our app will be launched from.\n\n2) Add Node and npm engines (first run node -v and npm -v to get the correct version):\n\n```\n\"engines\": {\n    \"node\": \"12.14.1\",\n    \"npm\": \"6.13.4\"\n}\n```\n\n3) Add typescript configuration to dependencies:\nCopy \"typescript\": \"~2.3.3\" from devDependencies to dependencies to also inform Heroku what typescript version to use.\n\n4) Install Enhanced Resolve 3.3.0:\nRun the command \n\n```\nnpm install enhanced-resolve@3.3.0 --save-dev\n```\n\n5) To run our  app in production we need an Express server. First, add it to local node repository (don't need if it's included in package.json as in our case):\n\n```\nnpm install express path --save\n```\nCreate a server.js file in the root of the application and with the following context:\n\n```\n//Install express server\nconst express = require('express');\nconst path = require('path');\n\nconst app = express();\n\n// Serve our static files.\napp.use(express.static('./dist/anki-cards'));\n\n// Wait for a request to any path and redirect all of the requests to index.html\napp.get('/*', function(req, res) {\n  res.sendFile('index.html', {root: 'dist/anki-cards/'});\n});\n\n// Listen for requests at the PORT specified by env variables or the default Heroku port, which is 8080\napp.listen(process.env.PORT || 8080);\n```\n\nIn general, this is a universal minimal code which can be re-used in other Angular/React projects.\n\n6) Change start command (not needed in our case):\nIn package.json, change the \"start\" command to node server.js so it becomes:\n\n```\n\"start\": \"node server.js\"\n```\n\n\n## Deployment\n\nDeployment to Heroku is quite straightforward. I will describe here the deployment variant with the help of Heroku CLI.\n\n1) install heroku-cli\n\n2) clone project https://github.com/Akalu/cs-anki-cards\n\n3) login to your heroku account\n\n```\nheroku login\n```\n\n4) add heroku endpoint:\n\n```\nheroku git:remote -a cs-anki-cards\n```\n\n5) initiate Heroku's CI/CD pipeline using the command:\n\n```\n$ git push heroku master\n```\n\nAfter successful build the console should show the following output:\n\n```\nremote: -----\u003e Launching...\nremote:        Released v3\nremote:        https://cs-anki-cards.herokuapp.com/ deployed to Heroku\nremote:\nremote: Verifying deploy... done.\nTo https://git.heroku.com/cs-anki-cards.git\n * [new branch]      master -\u003e master\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakaliutau%2Fcs-anki-cards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakaliutau%2Fcs-anki-cards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakaliutau%2Fcs-anki-cards/lists"}