{"id":23065754,"url":"https://github.com/ullaskunder3/meriadb-nodejs-restapi","last_synced_at":"2026-04-30T20:33:40.006Z","repository":{"id":176894418,"uuid":"659326900","full_name":"ullaskunder3/meriaDB-nodejs-restapi","owner":"ullaskunder3","description":"This project is a simple REST API that allows you to manage user records. It is built using Node.js and MariaDB. You can create, retrieve, update, and delete user data using the provided endpoints.","archived":false,"fork":false,"pushed_at":"2024-04-08T03:01:21.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T08:48:55.263Z","etag":null,"topics":["crud-api","db","expressjs","mariadb","thunderclient","vscode"],"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/ullaskunder3.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,"publiccode":null,"codemeta":null}},"created_at":"2023-06-27T15:36:16.000Z","updated_at":"2023-06-28T11:51:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa33b89c-2a51-4c8c-97f8-20c4f808ead3","html_url":"https://github.com/ullaskunder3/meriaDB-nodejs-restapi","commit_stats":null,"previous_names":["ullaskunder3/meriadb-nodejs-restapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ullaskunder3/meriaDB-nodejs-restapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullaskunder3%2FmeriaDB-nodejs-restapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullaskunder3%2FmeriaDB-nodejs-restapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullaskunder3%2FmeriaDB-nodejs-restapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullaskunder3%2FmeriaDB-nodejs-restapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ullaskunder3","download_url":"https://codeload.github.com/ullaskunder3/meriaDB-nodejs-restapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullaskunder3%2FmeriaDB-nodejs-restapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32476682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["crud-api","db","expressjs","mariadb","thunderclient","vscode"],"created_at":"2024-12-16T05:09:54.949Z","updated_at":"2026-04-30T20:33:39.990Z","avatar_url":"https://github.com/ullaskunder3.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# User REST API\n\nThis API allows you to perform CRUD operations (Create, Read, Update, Delete) on user records stored in a MariaDB database.\n\n## Base URL\n\n```\nhttp://localhost:3000\n```\n\n## Resources\n\n### User\n\nRepresents a user record in the database.\n\n#### Attributes\n\n- `id` (integer): The unique identifier of the user.\n- `name` (string): The name of the user.\n- `email` (string): The email address of the user.\n\n### Endpoints\n\n#### Create a User\n\nCreate a new user record.\n\n- URL: `/data`\n- Method: `POST`\n- Request Body:\n\n  ```json\n  {\n    \"name\": \"ullas kunder\",\n    \"email\": \"ullaskunder3@gmail.com\"\n  }\n  ```\n\n- Response:\n  - Status: `201 Created`\n  - Body:\n    ```json\n    {\n      \"message\": \"Record created successfully\"\n    }\n    ```\n\n#### Get All Users\n\nRetrieve all user records.\n\n- URL: `/data`\n- Method: `GET`\n- Response:\n  - Status: `200 OK`\n  - Body:\n    ```json\n    [\n      {\n        \"id\": 1,\n        \"name\": \"Monkey D luffy\",\n        \"email\": \"luffy@emperor.com\"\n      },\n      {\n        \"id\": 2,\n        \"name\": \"ullas kunder\",\n        \"email\": \"ullaskunder3@gmail.com\"\n      },\n      ...\n    ]\n    ```\n\n#### Update a User\n\nUpdate an existing user record.\n\n- URL: `/data/:id`\n- Method: `PUT`\n- Request Body:\n\n  ```json\n  {\n    \"name\": \"Updated Name\",\n    \"email\": \"updated@example.com\"\n  }\n  ```\n\n- Response:\n  - Status: `200 OK`\n  - Body:\n    ```json\n    {\n      \"message\": \"Record updated successfully\"\n    }\n    ```\n\n#### Delete a User\n\nDelete an existing user record.\n\n- URL: `/data/:id`\n- Method: `DELETE`\n- Response:\n  - Status: `200 OK`\n  - Body:\n    ```json\n    {\n      \"message\": \"Record deleted successfully\"\n    }\n    ```\n\n\u003e Make sure rename .env-local to .env and replace current info with your db credientials\n\n\u003e If you are using Thunder Client, you can find the API collection provided in the project files.\n\nmake sure background db service is up and running\n\n```\nmysql -u root -p\n```\n\nOnce you are logged in to the MariaDB server, execute the following command to display the list of existing databases:\n\n```\nshow databases;\n```\n\nCreate a new database named `user_restapi` by executing the following command:\n\n```\ncreate database user_restapi;\n```\n\nAfter creating the database, switch to the newly created database using the following command:\n\n```\nMariaDB [(none)]\u003e use user_restapi\n```\n\nCreating the app_user Table\n\n```\nDatabase changed\nMariaDB [user_restapi]\u003e CREATE TABLE app_user(\n-\u003e id INT PRIMARY KEY AUTO_INCREMENT,\n-\u003e name VARCHAR(255) NOT NULL,\n-\u003e email VARCHAR(255) NOT NULL\n-\u003e );\nQuery OK, 0 rows affected (0.040 sec)\n\nMariaDB [user_restapi]\u003e\n```\n\n```\nCREATE TABLE app_user (\n  id INT PRIMARY KEY AUTO_INCREMENT,\n  name VARCHAR(255) NOT NULL,\n  email VARCHAR(255) NOT NULL\n);\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fullaskunder3%2Fmeriadb-nodejs-restapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fullaskunder3%2Fmeriadb-nodejs-restapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fullaskunder3%2Fmeriadb-nodejs-restapi/lists"}