Versão
Idioma

Este documento possui várias versões. Selecione as opções mais adequadas para você.

UI
Database
Tiered

Getting Started

This document assumes that you prefer to use MVC / Razor Pages as the UI framework and MongoDB as the database provider. For other options, please change the preference on top of this document.

Create the Database

Connection String

Check the connection string in the appsettings.json file under the .Web project

"ConnectionStrings": {
  "Default": "mongodb://localhost:27017/BookStore"
}

The solution is configured to use MongoDB in your local computer, so you need to have a MongoDB server instance up and running or change the connection string to another MongoDB server.

Seed Initial Data

The solution comes with a .DbMigrator console application which seeds the initial data. It is useful on development as well as on production environment.

.DbMigrator project has its own appsettings.json. So, if you have changed the connection string above, you should also change this one.

Right click to the .DbMigrator project and select Set as StartUp Project

set-as-startup-project

Hit F5 (or Ctrl+F5) to run the application. It will have an output like shown below:

db-migrator-output

Initial seed data creates the admin user in the database (with the password is 1q2w3E*) which is then used to login to the application. So, you need to use .DbMigrator at least once for a new database.

Run the Application

Ensure that the .Web project is the startup project. Run the application which will open the login page in your browser:

Use Ctrl+F5 in Visual Studio (instead of F5) to run the application without debugging. If you don't have a debug purpose, this will be faster.

bookstore-login

Enter admin as the username and 1q2w3E* as the password to login to the application. The application is up and running. You can start developing your application based on this startup template.

Mobile Development

If you want to include a React Native project in your solution, add -m react-native (or --mobile react-native) argument to project creation command. This is a basic React Native startup template to develop mobile applications integrated to your ABP based backends.

See the Getting Started with the React Native document to learn how to configure and run the React Native application.

See Also

Esta página foi útil?
Por favor, faça uma seleção.
Obrigado pelo seu valioso feedback!

Observe que, embora não possamos responder aos comentários, nossa equipe usará seus comentários para melhorar a experiência.

Neste documento
Mastering ABP Framework Book
Dominando a estrutura ABP

Este livro o ajudará a obter uma compreensão completa da estrutura e das técnicas modernas de desenvolvimento de aplicativos da web.