ASP.NET Core 3.1 / React SPA Template App
The ASP.NET Core / React SPA Template App is a template application using ASP.NET Core 3.1 for a REST/JSON API server and React for a web client. It utilizes various technologies such as PostgreSQL, Entity Framework Core, JSON Web Token (JWT) authorization, and Docker for development purposes. The app also includes features for testing and DevOps, making it a comprehensive solution for building web applications.
To set up and run the ASP.NET Core / React SPA Template App, follow these steps:
Install the following dependencies on your machine:
Clone the repository and navigate to the project directory.
Install the Node and .NET Core dependencies by running the command:
npm install
Start the app for development by running the command:
npm start
This will ensure that the PostgreSQL and MailCatcher Docker images are up and running, build the app if changes are made, watch for further changes, and start the web server on http://localhost:5000
.
To generate and run a migration on the database after making changes to Entity Framework models, run the command:
npm run migrate
Run the tests by executing the command:
npm test
To provision a production environment, create an ops/config.yml
file and then run the command:
npm run provision:prod
Make sure to follow the instructions in the ops
README file.
The ASP.NET Core / React SPA Template App provides developers with a comprehensive starting point for building web applications. It combines the power of ASP.NET Core for the server-side API and React for the front-end client. The app includes features such as authentication via JSON Web Tokens, testing with xUnit and Enzyme, and DevOps automation with Ansible. With its extensive documentation and easy installation process, the template app is a valuable resource for developers looking to accelerate the development of ASP.NET Core and React-based applications.