{"id":25229023,"url":"https://github.com/ajthinking/stackoverflow-server","last_synced_at":"2025-04-05T14:12:36.320Z","repository":{"id":62733243,"uuid":"562076532","full_name":"ajthinking/stackoverflow-server","owner":"ajthinking","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-05T09:32:42.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-11T10:47:24.529Z","etag":null,"topics":[],"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/ajthinking.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":"2022-11-05T08:27:50.000Z","updated_at":"2023-03-17T13:25:03.000Z","dependencies_parsed_at":"2022-11-05T10:00:24.934Z","dependency_job_id":null,"html_url":"https://github.com/ajthinking/stackoverflow-server","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajthinking%2Fstackoverflow-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajthinking%2Fstackoverflow-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajthinking%2Fstackoverflow-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajthinking%2Fstackoverflow-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajthinking","download_url":"https://codeload.github.com/ajthinking/stackoverflow-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345846,"owners_count":20924102,"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":[],"created_at":"2025-02-11T10:46:55.720Z","updated_at":"2025-04-05T14:12:36.303Z","avatar_url":"https://github.com/ajthinking.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Stackoverflow: server :dizzy:\n\nSimplified clone of Stackoverflow. This repo holds the _Server_. [See client here](https://github.com/ajthinking/stackoverflow-client).\n\n## :rocket: Tech Stack\n\n- NodeJs\n- TypeScript\n- Express\n- MongoDB\n- Mongoose\n\n## :warning: Prerequisite\n\n- node\n- npm/yarn\n- mongodb\n\n## :cd: How to run local\n\n```bash\n# Clone this repository\n$ git clone git@github.com:ajthinking/stackoverflow-server.git\n\n# Go into the repository\n$ cd stackoverflow-server\n\n# Start mongodb locally\n$ mongod\n\n# Install dependencies\n$ yarn install\n\n# Start the backend server\n$ yarn dev\n\n# Your API should now be running, try:\n$ open http://localhost:3000/api/question\n\n```\n\n## :mag_right: Testing\n\nMake sure mongodb is running before testing the server.\n\n```bash\n$ yarn test\n```\n\n\u003csub\u003eThere are missing tests.\u003c/sub\u003e\n\n## :globe_with_meridians: Deploy\n\n#### Deploying Server App on Heroku\n\n- You will need to have setup a [MongoDB Atlas account and database](https://docs.atlas.mongodb.com/getting-started/).\n- Make sure that the cluster has allowlisted connections from anywhere.\n- Create a [Heroku](https://dashboard.heroku.com/new-app) new app.\n- Go to app settings\n- Add the following enviroments.\n  - DATABASE_URL (to use your MongoDB connection string)\n  - JWT_SECRET\n- Add Nodejs to buildpacks\n\n-       # Go into the repository\n        $ cd stackoverflow-server\n\n        # Heroku Setup\n        $ yarn install -g heroku\n        $ heroku login\n        $ heroku git:remote -a your-app-name\n\n        # push subdirectory repository with subtree\n        $ git subtree push --prefix server heroku master\n\n## :crown: Acknowledgments\n\nThis is a continuation of [salihozdemir/stackoverflow-clone](https://github.com/salihozdemir/stackoverflow-clone)\n\n## :memo: License\n\nThis project is made available under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajthinking%2Fstackoverflow-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajthinking%2Fstackoverflow-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajthinking%2Fstackoverflow-server/lists"}