- Notifications
You must be signed in to change notification settings - Fork6
Fast, reliable, and scalable RealWorld app implemented with TypeScript, Node.js, AWS Lambda, and tested with high-quality unit and integration tests
License
kenyipp/realworld-nodejs-example-app
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Example Node (Express + Knex) codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to theRealWorld API spec.
This repository has been approved and included on theproject page by theCodebase.show team. I am committed to continuously improving this codebase and incorporating new technologies and useful Node modules as I discover them.
I created a separaterepository to deploy this project architecture viaAws Cdk. Please check this repository.
This repository has complete functionality — pull requests and issues are welcome!
Demo|Get Started|Architecture|Contributing
To demonstrate the functionality of the backend, we have deployed a live demo version of the application. You can visit the demo by following this link:https://conduit-api-prod.kenyip.cc.
The API has several endpoints that you can test out using a tool like Postman or cURL. You can find the documentation for the API endpoints on theAPI documentation page. Feel free to use this endpoint to create your amazing frontend applications!
Please note that the demo version of the application is intended for demonstration purposes only and may not be suitable for production use. If you would like to deploy the application yourself, please follow the instructions in theGet Started section of this README.
This project utilizesYarn as its package manager. Please ensure that Yarn is installed before you begin working on this project.
To start the Docker setup, run the following commands:
docker-compose builddocker-compose up -d
The Docker Compose configuration includes the API server, MySQL database, and the necessary program to set up the required tables for the application to function correctly.
- Configure the environment variables according to the table below:
| Env | Description | Required |
|---|---|---|
| NODE_ENV | Environment in which the application is running (e.g., develop, test, ci, production) | Yes |
| DOMAIN | Domain name for the application | No |
| AUTH_EXPIRES_IN | Duration for which the authentication token is valid | No |
| AUTH_JWT_SECRET | Secret key used for signing JWT tokens | Yes |
| DATABASE_HOST | Hostname of the database server | Yes |
| DATABASE_PORT | Port number on which the database is listening | Yes |
| DATABASE_USER | Username for database authentication | Yes |
| DATABASE_PASSWORD | Password for database authentication | Yes |
| DATABASE_NAME | Name of the database to connect to | Yes |
Execute the following commands to install all dependencies and launch the development server:
yarnyarn dev
Afterward, navigate tohttp://localhost:3100/api/health-check to verify if the server is operating correctly.
This project utilizes theExpress Serverless framework along withAmazon CDK to deploy the server in a serverless architecture. You can find the./infra folder in the root directory, which contains all the setup code related to this server. To view the entire architecture, including roles, buckets, and the CodeBuild pipeline, please refer tothis repository.
To deploy the application, runyarn deploy --all in the command line interface. If you need more detailed explanations on the techniques and application architecture, refer to thearchitecture section.
For more information on deploying a serverless application with Amazon SAM, please visit theAWS documentation.
I have written a blog post about the techniques, structure, architecture, and my reflections on this project. For more details, clickhere!
Please review the existing issues in this repository for areas that require improvement.If you identify any missing or potential areas for improvement, feel free to open a new issue for them.
Before deploying and integrating the application, it is necessary to perform a series of validations such as testing, linting, and formatting. We recommend runningmake pre-commit before making each commit to ensure compliance.
This project is licensed under the MIT License - see theMIT file for details.
About
Fast, reliable, and scalable RealWorld app implemented with TypeScript, Node.js, AWS Lambda, and tested with high-quality unit and integration tests
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
