{"id":13498611,"url":"https://github.com/serverless-plus/shorten-urls","last_synced_at":"2025-03-29T01:32:11.467Z","repository":{"id":66317519,"uuid":"301035779","full_name":"serverless-plus/shorten-urls","owner":"serverless-plus","description":"Serverless Shorten Urls Service","archived":false,"fork":false,"pushed_at":"2020-10-18T13:02:46.000Z","size":44,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-01T21:47:35.442Z","etag":null,"topics":["serverless","serverless-components","shorten-urls"],"latest_commit_sha":null,"homepage":"https://url.sls.plus","language":"TypeScript","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/serverless-plus.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}},"created_at":"2020-10-04T04:00:55.000Z","updated_at":"2021-10-28T05:24:17.000Z","dependencies_parsed_at":"2024-01-18T23:04:47.209Z","dependency_job_id":"8c882d4f-b955-427b-a1b4-08f48a6f1a00","html_url":"https://github.com/serverless-plus/shorten-urls","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/serverless-plus%2Fshorten-urls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-plus%2Fshorten-urls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-plus%2Fshorten-urls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-plus%2Fshorten-urls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverless-plus","download_url":"https://codeload.github.com/serverless-plus/shorten-urls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222445087,"owners_count":16985756,"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":["serverless","serverless-components","shorten-urls"],"created_at":"2024-07-31T21:00:38.047Z","updated_at":"2024-10-31T16:30:24.162Z","avatar_url":"https://github.com/serverless-plus.png","language":"TypeScript","funding_links":[],"categories":["开发模板"],"sub_categories":[],"readme":"# Shorten Urls\n\n[Online](https://url.sls.plus)\n\n[![Build Status](https://github.com/serverless-plus/shorten-urls/workflows/Validate/badge.svg?branch=master)](https://github.com/serverless-plus/shorten-urls/actions?query=workflow:Validate+branch:master)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\nServerless shorten urls service using [serverless framework](https://github.com/serverless/serverless).\n\n## Features\n\n- [x] [Serverless Framework](https://github.com/serverless/serverless)\n- [x] [Typescript](https://github.com/microsoft/TypeScript)\n- [x] [Github Actions](https://github.com/features/actions)\n- [x] [Eslint](https://github.com/eslint/eslint)\n- [x] [Prettier](https://github.com/prettier/prettier)\n- [x] [Jest](https://github.com/facebook/jest)\n- [x] [semantic-release](https://github.com/semantic-release/semantic-release)\n\n## Usage\n\n```bash\n$ git clone https://github.com/serverless-plus/shorten-urls.git\n```\n\n## Development\n\nInstall dependencies:\n\n```bash\n$ npm install\n```\n\nTo start server locally, you can start local posgresql by docker and connect to it for development.\n\nStart local docker postgresql:\n\n```bash\n$ npm run docker:up\n```\n\nThen copy `.env.example` to `.env`:\n\n```bash\n$ cp .env.example .env\n```\n\nRun server:\n\n```bash\n$ npm run dev\n```\n\n## Deployment\n\nBefore deployment, you should build project:\n\n```bash\n$ npm run build\n```\n\nThen you can deploy relative resources, after the first deployment, below step is optional for next time.\n\n### Deploy database\n\nServerless PostgreSQL need `VPC`, so we need create a `VPC` for it:\n\n```bash\n$ npm run deploy:vpc\n```\n\nThen we can deploy database:\n\n```bash\n$ npm run deploy:db\n```\n\n### Deploy layer\n\nFor nodejs project, we can deploy `node_modules` directory to layer, so after first deployment, we do not need to deploy `node_modules` directory again, this is very useful to make our source code deployment quickly.\n\nTo make layer code smaller, we can run:\n\n```bash\n$ rm -rf node_modules \u0026\u0026 npm install --production\n```\n\nso we just deploy npm modules of production to layer,\n\n```bash\n$ npm run deploy:layer\n```\n\n\u003e **Notice**: after layer deployment, if you do not change npm modules for production, you don't need to deploy layer.\n\n### Deploy static files\n\nUpload static files in `public` directory to COS:\n\n```bash\n$ npm run deploy:cos\n```\n\n### Deploy server code\n\n```bash\n$ npm run deploy\n```\n\n### Commit Lint\n\nAll `git commit` mesage must follow below syntax:\n\n```bash\ntype(scope?): subject  #scope is optional\n```\n\nsupport type：\n\n- **feat**: add new feature\n- **fix**: fix bug or patch feature\n- **ci**: CI\n- **chore**: modify config, nothing to do with production code\n- **docs**: create or modifiy documents\n- **refactor**: refactor project\n- **revert**: revert\n- **test**: test\n\nMost of time, we just use `feat` and `fix`.\n\n## License\n\nMIT License\n\nCopyright (c) 2020 Serverless Plus\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-plus%2Fshorten-urls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverless-plus%2Fshorten-urls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-plus%2Fshorten-urls/lists"}