{"id":15137071,"url":"https://github.com/raferdev/express_microservice","last_synced_at":"2025-09-29T06:31:03.627Z","repository":{"id":235203503,"uuid":"789209047","full_name":"raferdev/express_microservice","owner":"raferdev","description":"Here you will see a microservice project that includes complete support for development.","archived":true,"fork":false,"pushed_at":"2024-04-24T19:49:26.000Z","size":315,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-27T06:43:05.389Z","etag":null,"topics":["aws","aws-lambda","dynamodb","express","jest","microservice","opentelemetry","serverless","test"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/raferdev.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":"2024-04-19T23:42:02.000Z","updated_at":"2024-04-24T19:51:59.000Z","dependencies_parsed_at":"2024-04-24T20:51:19.388Z","dependency_job_id":"65b95bb2-6918-4e6e-94e4-28cfc68c7cbb","html_url":"https://github.com/raferdev/express_microservice","commit_stats":null,"previous_names":["raferdev/express_microservice"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raferdev%2Fexpress_microservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raferdev%2Fexpress_microservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raferdev%2Fexpress_microservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raferdev%2Fexpress_microservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raferdev","download_url":"https://codeload.github.com/raferdev/express_microservice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234597573,"owners_count":18857980,"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":["aws","aws-lambda","dynamodb","express","jest","microservice","opentelemetry","serverless","test"],"created_at":"2024-09-26T06:43:15.891Z","updated_at":"2025-09-29T06:31:03.060Z","avatar_url":"https://github.com/raferdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CUSTOMERS MICROSERVICE REST API\n\n[![Test amd Deploy](https://github.com/raferdev/express_microservice/actions/workflows/deploy.yml/badge.svg)](https://github.com/raferdev/express_microservice/actions/workflows/deploy.yml)\n\nThis is a microservice builded with serverless framework.\n\nThis project contains:\n\n- CI/CD : Using Github Actions to automate tests with Jest and deploy serverless insfrastructure on AWS cloud\n\n- Logs/Metrics/Control : Environment instrumentalized with open-telemetry Node, Express, and Winston, being captured by AWS observability.\n\n- Architecture: Built across Express routes, middlewares, controllers, and services, it can handle and control all endpoints using AWS Lambda and persist on DynamoDB.\n\n- Linting: Eslint with flat config, prettier, lint-staged with husly.\n\nTable of Content:\n\n- 1.0 - [Installation](#install)\n- 2.0 - [Running](#run)\n- 2.1 - [Tests](#run-tests)\n- 3.0 - [API REST](#api-rest)\n\n## [Install](#install)\n\n    pnpm install\n\n## [Run the app](#run)\n\nYou need first create dynamoDB table in AWS with the name \"customers-microservice-$stage\"\n$stage is the stage that you will pass on initial script\n\nlike:\n\n - serverless offline --stage development\n\n## [Run the tests](#run-tests)\n\n    pnpm test\n\n# [REST API](#api-rest)\n\nThe REST API to the example app is described below.\n\n## Get list of Things\n\n### Request\n\n`GET /v1/customers`\n\n    curl -i -X GET'Accept: application/json' http://localhost:3000/v1/customers\n\n### Response\n\n    HTTP/1.1 200 OK\n    Date: Thu, 24 Feb 2011 12:36:30 GMT\n    Status: 200 OK\n    Connection: close\n    Content-Type: application/json\n    Content-Length: 2\n\n    []\n\n## Create a new customer\n\n### Request\n\n`PUT /v1/customers`\n\n    curl -i -X PUT 'Accept: application/json' -d 'name=Foo\u0026email=new@new\u0026phone=+553488383584\u0026addess=exemple' http://localhost:3000/v1/customers\n\n### Response\n\n    HTTP/1.1 201 Created\n    Date: Thu, 24 Feb 2011 12:36:30 GMT\n    Status: 201 Created\n    Connection: close\n    Content-Type: application/json\n    Location: /thing/1\n    Content-Length: 36\n\n    { \"customersID\":$UUID,\n      \"name\":\"Foo\",\n      \"email\":\"new@new\",\n      \"phone\":\"+553488383584\",\n      \"address\":\"exemple city\"}\n\n## Get a specific customer\n\n### Request\n\n`GET /v1/customers/:customerID`\n\n    curl -i -H 'Accept: application/json' http://localhost:3000/v1/customers/:customerID\n\n### Response\n\n    HTTP/1.1 200 OK\n    Date: Thu, 24 Feb 2011 12:36:30 GMT\n    Status: 200 OK\n    Connection: close\n    Content-Type: application/json\n    Content-Length: 36\n\n{ \"customerID\":$UUID,\n\"name\":\"Foo\",\n\"email\":\"new@new\",\n\"phone\":\"+553488383584\",\n\"address\":\"exemple city\"}\n\n## Delete customer\n\n### Request\n\n`DELETE /v1/customers/:customersID`\n\n    curl -i -H 'Accept: application/json' http://localhost:3000/v1/customers/:customersID\n\n### Response\n\n    HTTP/1.1 200 Success\n    Date: Thu, 24 Feb 2011 12:36:30 GMT\n    Status: 404 Not Found\n    Connection: close\n    Content-Type: application/json\n    Content-Length: 35\n\n    {}\n\n## Search by text\n\n### Request\n\n`GET /v1/search`\n\n    curl -i -H 'Accept: application/json' -d 'name=Bar\u0026junk=rubbish' http://localhost:3000/v1/search?text=exemple%text\n\n### Response\n\n    HTTP/1.1 200 Success\n    Date: Thu, 24 Feb 2011 12:36:31 GMT\n    Status: 200 Success\n    Connection: close\n    Content-Type: application/json\n    Location: /thing/2\n    Content-Length: 35\n\n    [{ \"customerID\":$UUID,\n\n        \"name\":\"Foo\",\n        \"email\":\"new@new\",\n        \"phone\":\"+553488383584\",\n        \"address\":\"exemple city\"},... ]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraferdev%2Fexpress_microservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraferdev%2Fexpress_microservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraferdev%2Fexpress_microservice/lists"}