{"id":19522132,"url":"https://github.com/chrisco/crud_warmup_server","last_synced_at":"2026-07-25T23:30:16.609Z","repository":{"id":227972065,"uuid":"64362969","full_name":"chrisco/CRUD_warmup_server","owner":"chrisco","description":null,"archived":false,"fork":false,"pushed_at":"2016-07-28T20:53:11.000Z","size":207,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-08T14:15:15.620Z","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/chrisco.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-07-28T03:58:01.000Z","updated_at":"2016-07-28T03:59:08.000Z","dependencies_parsed_at":"2024-03-22T11:00:43.586Z","dependency_job_id":null,"html_url":"https://github.com/chrisco/CRUD_warmup_server","commit_stats":null,"previous_names":["chrisco/crud_warmup_server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisco%2FCRUD_warmup_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisco%2FCRUD_warmup_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisco%2FCRUD_warmup_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisco%2FCRUD_warmup_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisco","download_url":"https://codeload.github.com/chrisco/CRUD_warmup_server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240771906,"owners_count":19854982,"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":"2024-11-11T00:37:19.543Z","updated_at":"2026-07-25T23:30:16.486Z","avatar_url":"https://github.com/chrisco.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CRUD Warmup Server\n\nThis is the second part of a 3-part warmup series where you will build a de-coupled Full Stack App.\n\nYou'll be using express to create a JSON API, and you'll deploy the API to heroku.\n\n# Getting Started\n\nFork/clone this repo. Make a pull request when finished.\n\n### Generate an Express App\n\n```\nexpress .\n```\n\nCreate a folder in the root called `api`\n\nAll of your CRUD endpoints will exist inside of the `api` folder.\n\n### Connecting to your DB\n\n* Copy the `knexfile.js` from your DB warmup into the root of this folder.\n* Create a folder called db with a `knex.js` file inside that uses the connection information from `knexfile.js` and exports a connected instance of knex\n\n### Signup\n\nFor the user table created in the DB warmup, you will only need a POST route to create a user:\n\nMethod: `POST`\n\nEndpoint: `/auth/signup`\n* Creates a user in the user table IFF a user with the given username does not exist in the DB.\n  * Hash the password with bcrypt\n* Responds with the ID of the user if the user was created.\n* Responds with an error message and an error status code if the user is already in the DB.\n\n### CRUD\n\nYour API should include full CRUD routes for the other resources in your DB.\n\nEach resource endpoint should begin with: `/api/resourceName`\n\n* `GET` `/api/resourceName`\n  * Respond with all rows in DB\n* `GET` `/api/resourceName/:id`\n  * Respond with a single row from DB\n* `POST` `/api/resourceName`\n  * Inserts a row into the DB with the data from the body of the request\n* `PUT` `/api/resourceName/:id`\n  * Updates a single row in the DB with the data from the body of the request\n* `DELETE` `/api/resourceName/:id`\n  * Deletes a single row in the DB\n\n## Testing your API\n\nYou use a tool like `postman` to test your API endpoints.\n\n# Deploy!\n\nGo to the heroku dashboard and copy the git url from the heroku app you created in the DB warmup.\n\nAdd the heroku remote to this repo:\n\n`git remote add heroku your-heroku-git-url-here`\n\nAdd/commit your changes, then push to heroku:\n\n`git push heroku master`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisco%2Fcrud_warmup_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisco%2Fcrud_warmup_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisco%2Fcrud_warmup_server/lists"}