diff --git a/.github/settings.yml b/.github/settings.yml index 3cbbd40..1243ecd 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -1,7 +1,7 @@ repository: - name: express-typescript-service-template - description: Template for new services based on Express and Typescript with the Best Practices and Ready for Production - homepage: github.com/AlbertHernandez/express-typescript-service-template + name: express-kubernetes-example + description: Example of an express service working in Kubernetes + homepage: github.com/AlbertHernandez/express-kubernetes-example topics: nodejs, template, typescript, nodejs-service-template, express, nodejs-express-template has_wiki: false private: false diff --git a/README.md b/README.md index cfa669a..d633de8 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,14 @@
-- Template for new services based on Express and Typescript with the Best Practices and Ready for Production + Example of an express service working in Kubernetes
- + @@ -20,34 +20,15 @@ ## ๐ Motivation -Starting a new service in NodeJS can be a bit frustrating, there are a lot of things to consider if we want to have a really good starting point where later we can iterate. +The main idea of this repository is to show how we can create an express service using typescript and running it in Kubernetes. Note that this repository is not a template for starting new projects so we will not keep it up to date in terms of dependencies, vulnerabilities or new practices, if you are looking for a new template we recommend you to check the [project templates](#-project-templates) section. -The main objective of this template is to provide a good base configuration for our NodeJS services that we can start using and move to production as soon as possible. +## ๐คฉ Project templates -## ๐ What is including this template? +Are you thinking in start new projects in nestjs, other frameworks or create a super fancy library? I recommend you to check the following templates I have been working on: -1. ๐ณ Fully dockerized service ready for development and production environments with the best practices for docker, trying to provide a performance and small image just with the code we really need in your environments. -2. ๐ท Use [SWC](https://swc.rs/) for compiling and running the tests of the service. -3. โก๏ธ Configure [Express](https://expressjs.com/) as HTTP framework. -4. ๐ถ Integration with [husky](https://typicode.github.io/husky/) to ensure we have good quality and conventions while we are developing like: - - ๐ Running the linter over the files that have been changed - - ๐ฌ Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) to ensure our commits have a convention. - - โ Run the tests automatically. - - โ๏ธ Check our project does not have type errors with Typescript. - - ๐ Check typos to ensure we don't have grammar mistakes. -5. ๐งช Testing with [Vitest](https://vitest.dev/) and [supertest](https://github.com/ladjs/supertest) for unit and e2e tests. -6. ๐๏ธ Performance testing using [k6](https://grafana.com/oss/k6/). -7. ๐ค๐ค Combine unit and e2e test coverage. In the services we may have both type of tests, unit and e2e tests, and usually we would like to see what is the combined test coverage, so we can see the full picture. -8. ๐ Custom path aliases, where you can define your own paths (you will be able to use imports like `@/shared/logger` instead of `../../../src/shared/logger`). -9. ๐ CI/CD using GitHub Actions, helping ensure a good quality of our code and providing useful insights about dependencies, security vulnerabilities and others. -10. ๐ฆโ๐ฅ Usage of ESModules instead of CommonJS, which is the standard in JavaScript. - -## ๐คฉ Other templates - -Are you thinking in start new projects in other frameworks or create a super fancy library? If you like this template there are others base on this you can check: - -- [Template for new Typescript Libraries](https://github.com/AlbertHernandez/typescript-library-template) - [Template for new NestJS Services](https://github.com/AlbertHernandez/nestjs-service-template) +- [Template for new Typescript Libraries](https://github.com/AlbertHernandez/typescript-library-template) +- [Template for new Typescript Express Services](https://github.com/AlbertHernandez/express-kubernetes-example) - [Template for new GitHub Actions based on NodeJS](https://github.com/AlbertHernandez/github-action-nodejs-template) ## ๐งโ๐ป Developing diff --git a/package-lock.json b/package-lock.json index 816af35..780b5a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "express-typescript-service-template", + "name": "express-kubernetes-example", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "express-typescript-service-template", + "name": "express-kubernetes-example", "version": "1.0.0", "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 903df7b..a2aec5e 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,22 @@ { - "name": "express-typescript-service-template", + "name": "express-kubernetes-example", "version": "1.0.0", "type": "module", "description": "Skeleton for new typescript services based on express", "author": "alberthernandezdev@gmail.com", "license": "MIT", "bugs": { - "url": "https://github.com/AlbertHernandez/express-typescript-service-template/issues" + "url": "https://github.com/AlbertHernandez/express-kubernetes-example/issues" }, - "homepage": "https://github.com/AlbertHernandez/express-typescript-service-template#readme", + "homepage": "https://github.com/AlbertHernandez/express-kubernetes-example#readme", "repository": { "type": "git", - "url": "git+https://github.com/AlbertHernandez/express-typescript-service-template.git" + "url": "git+https://github.com/AlbertHernandez/express-kubernetes-example.git" }, "keywords": [ "typescript", "express", - "template" + "kubernetes" ], "engines": { "node": ">=18.x",