Installation¶
Restore npm packages¶
After cloning Base repository, go to Barebone folder and run npm ci --save-dev
command so that dependencies packages are installed and settings updated.
Note
You must have Nodejs to restore web dependencies.
Restore nuGet packages¶
Restoring the nuGet packages is now an implicit command executed at application build so you don’t need to do it manually.
Update database with migration¶
dotnet ef database update
.services_.AddDbContext<...
).Build the application¶
Go to the root folder and run bp.bat
under Windows or bp.sh
under Linux/Macos. (use -h for help).
Note
You must have .NET Core SDK to compile and build the application.
Configure the application¶
appsettings.json
file.See configuration section for a full explanation.
Run the app¶
Warning
Remove the SeedDatabase.dll
to avoid any attempt to create a new administrator. See RestSeed configuration section.
dotnet run
.dotnet run --project WebApplication\WebApplication.csproj
).After that, the application is available on http://localhost:5000/
Note about Visual Studio 2017¶
Note about Rider 2017.3¶
./bp.sh copyexts
and ./bp.sh copydeps
after building the solution or project.Add the administrator user¶
- curl:
curl -i -X POST -H 'Content-Type: application/json' http://localhost:5000/dev/seed/create-user -d {}
- powershell:
Invoke-WebRequest -Uri http://localhost:5000/dev/seed/create-user -Method POST
This will create the administrator user with general permissions.
Note
Actually, we creating demo user. The first user is johndoe.