{"id":23174597,"url":"https://github.com/eliacontini/social-networking-serverless-kata","last_synced_at":"2026-05-11T05:42:04.543Z","repository":{"id":78902827,"uuid":"347685577","full_name":"EliaContini/social-networking-serverless-kata","owner":"EliaContini","description":"A serverless-based social networking API (similar to Twitter)","archived":false,"fork":false,"pushed_at":"2021-05-28T07:43:51.000Z","size":117,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T09:15:17.133Z","etag":null,"topics":["aws-lambda","javascript","mongodb","nodejs","serverless","serverless-framework"],"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/EliaContini.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":"2021-03-14T16:12:46.000Z","updated_at":"2021-05-28T07:43:54.000Z","dependencies_parsed_at":"2023-05-06T17:00:31.929Z","dependency_job_id":null,"html_url":"https://github.com/EliaContini/social-networking-serverless-kata","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/EliaContini%2Fsocial-networking-serverless-kata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliaContini%2Fsocial-networking-serverless-kata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliaContini%2Fsocial-networking-serverless-kata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliaContini%2Fsocial-networking-serverless-kata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EliaContini","download_url":"https://codeload.github.com/EliaContini/social-networking-serverless-kata/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271492,"owners_count":20911586,"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-lambda","javascript","mongodb","nodejs","serverless","serverless-framework"],"created_at":"2024-12-18T05:30:21.427Z","updated_at":"2026-05-11T05:41:59.516Z","avatar_url":"https://github.com/EliaContini.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Social Networking Serverless Kata\n\nThis is a solution for the [Social Networking Serverless Kata](https://github.com/petecocoon/Social-Networking-Serverless-Kata).\n\n## Notes regarding the differences with the first solution\n\nThis is the review of the [first solution](https://github.com/EliaContini/social-networking-serverless-kata/tree/v1.0) that does not follow the design\nprinciples of AWS Lambda.\n\nEach endpoint must be a separate function.\n\n## Overview\n\nIt is written in JavaScript/Node.js using these libraries:\n\n-   [MongoDB In-Memory Server](https://github.com/nodkz/mongodb-memory-server)\n-   [Mongoose](https://mongoosejs.com/)\n-   [Tap](https://node-tap.org/)\n\nand deployed on AWS Lambda using [Serverless](https://www.serverless.com/) Framework.\n\n## Available endpoints\n\n| HTTP Method | Endpoint                      | Descriprion                               |\n| :---------- | :---------------------------- | :---------------------------------------- |\n| GET         | /posts/                       | Retrieves the post of all users           |\n| GET         | /posts/?username=elia.contini | Retrieves the post of `elia.contini`      |\n| POST        | /posts/                       | Create a post                             |\n| DELETE      | /posts/:id/                   | Delete the post with `_id` equal to `:id` |\n\nTo create a post the payload must have this shape:\n\n    {\n        \"message\": \"My 1 post\",\n        \"username\": \"elia.contini\"\n    }\n\n## Prepare development environment\n\nI used [Visual Studio Code](https://code.visualstudio.com/). The folder\n`.vscode` contains the configuration for development and debugging operations.\n\n### Serverless Framework\n\nInstall the last version of [Serverless framework](https://www.serverless.com/framework/docs/providers/aws/guide/installation#installing-the-serverless-framework).\n\n### MongoDB Atlas\n\nYou need a [MongoDB Atlas](https://www.mongodb.com/) account. [Setup a cluster](https://www.freecodecamp.org/news/get-started-with-mongodb-atlas/)\nthat accepts connection from anywhere. Rename `sample.serverless.json` in `serverless.json`\nand set your `MONGODB_URI`.\n\n### AWS\n\nYou need an AWS account. Create a IAM user and setup credentials for Serverless\nFramework following this [guide](https://www.serverless.com/framework/docs/providers/aws/guide/credentials#creating-aws-access-keys).\n\n### Install project dependecies\n\nTo install project dependecies type on the terminal:\n\n    $ npm install\n\n## Running the application and the test suite on the local machine\n\nTo run the application type on the terminal:\n\n    $ npm start\n\nTo run tests type on the terminal:\n\n    $ npm test\n\nTest script is configured in watcher mode.\n\n## Deploying the solution on AWS Lambda using Serverless Framework\n\nTo deploy on AWS Labda type on the terminal:\n\n    $ serverless deploy -v\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliacontini%2Fsocial-networking-serverless-kata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feliacontini%2Fsocial-networking-serverless-kata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliacontini%2Fsocial-networking-serverless-kata/lists"}