https://github.com/chia1104/dotnet6-vite
A simple game that player can equip items and see their stats.
https://github.com/chia1104/dotnet6-vite
csharp docker dotnet6 postgresql railway react typescript vite
Last synced: 3 months ago
JSON representation
A simple game that player can equip items and see their stats.
- Host: GitHub
- URL: https://github.com/chia1104/dotnet6-vite
- Owner: Chia1104
- Created: 2022-07-29T06:40:18.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T02:44:57.000Z (over 2 years ago)
- Last Synced: 2025-06-19T18:46:02.344Z (about 1 year ago)
- Topics: csharp, docker, dotnet6, postgresql, railway, react, typescript, vite
- Language: TypeScript
- Homepage: https://dotnet6-vite-production.up.railway.app/
- Size: 8.47 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dotnet 6 and React with Vite Practice
This is a practice project for [.Net Core](https://dotnet.microsoft.com/) and [React](https://reactjs.org/).
A simple game that player can equip items and see their stats.
### Deployments
- [Railway](https://dotnet6-vite-production.up.railway.app/)
## Language and Tools
## Features
- [x] React with Vite
- [x] Authentication([JWT](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.JwtBearer/7.0.0-preview.6.22330.3))
- [x] Dockerized
## Get Started
Install dependencies
```bash
# server
$ cd dotnet6-vite
$ dotnet restore
# client
$ cd dotnet6-vite\Client
$ pnpm install
```
Generate the `.env` file and add your DB connection string.
```bash
# server
$ cd dotnet6-vite
$ cp .env.example .env
```
The .NET Entity Framework Core tools (dotnet ef) are used to generate EF Core migrations, to install the EF Core tools globally.
```bash
$ dotnet tool install -g dotnet-ef
```
Run the following command from the project root folder to install the EF Core design package, it provides cross-platform command line tooling support and is used to generate EF Core migrations.
```bash
# server
$ cd dotnet6-vite
$ dotnet ef migrations add InitialCreate
$ dotnet ef database update
```
Generate https certificate before running the app.
```bash
# client
$ cd dotnet6-vite\Client
$ pnpm prestart
```
Run the app.
```bash
# server
$ cd dotnet6-vite
$ dotnet run watch
```
Build the docker image in the root of the project folder
```bash
$ docker build -t app:test .
```