kenyipp / realworld-nodejs-example-app

Fast, reliable, and scalable RealWorld app implemented with TypeScript, Node.js, AWS Lambda, and tested with high-quality unit and integration tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node.js / Express / Typescript / MySql / Knex Example App

Example Node (Express + Knex) codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld API spec.

Actions Status codecov Known Vulnerabilities License

This repository has been approved and included on the project page by the Codebase.show team. I am committed to continuously improving this codebase and incorporating new technologies and useful Node modules as I discover them.

This repository has complete functionality — pull requests and issues are welcome!

Demo | Get Started | Architecture | Contributing

Demo

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-production.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 the API 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 the Get Started section of this README.

Get Started

This project utilizes PNPM as its package manager. Kindly ensure that you have installed PNPM before commencing work on this project.

Local Development

To install all dependencies and launch the development server, execute the following commands:

pnpm install
pnpm run dev

Afterward, navigate to http://localhost:3100/api/health-check to verify if the server is operating correctly.

To initialize the database in a non-production environment, you can use the POST API at http://localhost:3100/api/reset, which quickly resets the database.

Deployment

This project uses the Express Serverless framework and Amazon SAM to deploy the server as a serverless structure. In the root directory, you'll find a deployment template with hints to guide you through the deployment process.

To deploy the application, run sam deploy --guide in the command line interface. You'll be prompted with questions to configure the deployment. If you need more detailed explanations on the techniques and application architecture, refer to the architecture section.

For more information on deploying a serverless application with Amazon SAM, please visit the AWS documentation.

Architecture

I have written a blog post about the techniques, structure, architecture, and my reflections on this project. For more details, click here!

Contributing

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 commit

Before deploying and integrating the application, it is necessary to perform a series of validations such as testing, linting, and formatting. We recommend running make pre-commit before making each commit to ensure compliance.

License

This project is licensed under the MIT License - see the MIT 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

License:MIT License


Languages

Language:TypeScript 98.8%Language:JavaScript 0.7%Language:Shell 0.2%Language:HTML 0.1%Language:Makefile 0.1%