Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

kenyipp/realworld-nodejs-example-app

Repository files navigation

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 theRealWorld API spec.

Actions StatuscodecovKnown VulnerabilitiesLicense

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

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-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.

Get Started

This project utilizesYarn as its package manager. Please ensure that Yarn is installed before you begin working on this project.

Start the Program Using Docker

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.

Local Development

  1. Configure the environment variables according to the table below:
EnvDescriptionRequired
NODE_ENVEnvironment in which the application is running (e.g., develop, test, ci, production)Yes
DOMAINDomain name for the applicationNo
AUTH_EXPIRES_INDuration for which the authentication token is validNo
AUTH_JWT_SECRETSecret key used for signing JWT tokensYes
DATABASE_HOSTHostname of the database serverYes
DATABASE_PORTPort number on which the database is listeningYes
DATABASE_USERUsername for database authenticationYes
DATABASE_PASSWORDPassword for database authenticationYes
DATABASE_NAMEName of the database to connect toYes
  1. Execute the following commands to install all dependencies and launch the development server:

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

Deployment

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.

Architecture

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

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 runningmake pre-commit before making each commit to ensure compliance.

License

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

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp