-
Notifications
You must be signed in to change notification settings - Fork 394
02 quickstart
In the development environment, shared configurations for all adnc services are centralized in adnc\src\Demo\Shared\resources\appsettings.shared.Development.json (e.g., Redis, RabbitMQ, etc.).
Service-specific configurations are located in the appsettings.Development.json file of the corresponding API project (e.g., database connection strings, service ports, etc.).
"Redis": {
"Provider": "StackExchange",
"EnableLogging": true,
"SerializerName": "json",
"EnableBloomFilter": false,
"Dbconfig": {
"ConnectionString": "SERVER_IP:PORT,password=PASSWORD,defaultDatabase=0,ssl=false,sslHost=null,connectTimeout=4000,allowAdmin=true"
}
}"RabbitMq": {
"HostName": "SERVER_IP",
"Port": "PORT",
"VirtualHost": "/",
"UserName": "USERNAME",
"Password": "PASSWORD"
}"SysLogDb": {
"DbType": "mysql",
"ConnectionString": "Server=SERVER_IP;Port=PORT;database=adnc_syslog;uid=USERNAME;pwd=PASSWORD;connection timeout=30;"
}"Mysql": {
"ConnectionString": "Server=SERVER_IP;Port=PORT;database=adnc_admin;uid=USERNAME;pwd=PASSWORD;connection timeout=30;"
}Database scripts for all services are stored in adnc\doc\dbsql\adnc.sql, which can be imported all at once.
-
In
Visual Studio 2022, right-click the solution → Properties → Startup Project → Multiple startup projects. Check the following 4 projects:Adnc.Gateway.OcelotAdnc.Demo.Admin.ApiAdnc.Demo.Maint.ApiAdnc.Demo.Cust.Api
Note: You don't need to start all services during actual development; this is just for a quick local experience.
-
In the
Visual Studio 2022main interface, click the Start button to launch the 3 services and the gateway (4 projects in total). -
If startup errors occur, check the Console Window for error messages. Common issues include:
- RabbitMQ Port Configuration: RabbitMQ exposes two ports—one for the Web Management UI and one for data communication. Use the data port in the configuration.
- Port Conflicts: Conflicts with applications like WeChat Work or other services.
| Project Name | Description | URL |
|---|---|---|
| Adnc.Gateway.Ocelot | Gateway | http://localhost:5000 |
| Adnc.Demo.Admin.Api | System Management | http://localhost:50010 |
| Adnc.Demo.Maint.Api | Operations Management | http://localhost:50020 |
| Adnc.Demo.Cust.Api | Customer Management | http://localhost:50030 |
- Open the frontend project
adnc-vue-elementplusinVisual Studio Code. The frontend is built withVue 3and requires dependency installation. - Run the following commands for environment setup:
# Install pnpm
npm install pnpm -g
# Optional: Set mirror registry
pnpm config set registry https://registry.npmmirror.com
# Install dependencies
pnpm install
# Start the frontend project
pnpm run devadnc should now be running locally.
If this project helps you, please Star & Fork to support us!
ADNC — A practical .NET microservices/distributed development framework.
- Official Website: https://aspdotnetcore.net
- Online Demo: https://online.aspdotnetcore.net
- Documentation: https://docs.aspdotnetcore.net
- Code Generator: https://code.aspdotnetcore.net