Save and manage movie collection.
These instructions will get you a copy of the project up and running on your local machine.
To start working on this project you need to download and install the following components:
- .NET Core SDK (Software Development Kit)
- Visual Studio Code (Code editor)
- git (Distributed version control system)
- Download the files from Github.
- Install and configure MySQL (optional)
-
Get the latest version of .NET Core on the dotnet web site.
-
When the installation is complete, open a new command prompt and run the following command:
\> dotnet --list
- The command should print out information about the version, the runtime environment and a list of .NET Core SDKs installed.
.NET Core SDK (reflecting any global.json):
Version: 2.2.204
Commit: 8757db13ecRuntime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.2.204<br>
-
Download the latest version of Visual Studio Code installer for Windows.
-
Once it is downloaded, run the installer (VSCodeUserSetup-{version}.exe).
-
By default, Visual Studio Code is installed under C:\users<username>\AppData\Local\Programs\Microsoft VS Code.
This procedure assumes you want to use a distributed version control system to contribute to this project. Git is not mandatory to develop or to simply run an ASP.NET Core web application. In this case, simply download the repository from Github using the ZIP file option.
-
Download the latest version of the git installer for Windows.
-
Run the installer (Git-{version}-64-bit.exe).
-
The installer allow you to select the default text editor for Git. Accept the default if you prefer to change this later.
-
When the installation is complete, open Git Bash and run the following command:
\> git --version
- The command should print out information about the version.
git version 2.22.0.windows.1
Create a directory where you want the project and library to be cloned.
\> mkdir C:\FlickDBProject
\> cd C:\FlickDBProject
-
Open your browser and navigate to Github. Access the main page of the repository.
-
Under the repository name, click Clone or download.
-
In the Clone with HTTPs section, copy the clone URL for the repository.
-
Go back to your terminal and make sure you're still in the project root directory (C:\FlickDBProject).
-
Run git clone in your terminal and paste the URL from Step 3 to complete the command:
\>git clone https://github.com/residentsystem/FlickDBApp
- Press Enter to clone the project.
- Go into the project folder:
\> cd C:\FlickDBProject\FlickDBApp
- Run the application.
\> dotnet run
- The command should print information about the hosting environment, url and port listening.
Hosting environment: Development Content root path: C:\FlickDBProject\FlickDBApp Now listening on: https://localhost:5001 Now listening on: http://localhost:5000 Application started. Press Ctrl+C to shut down.
-
Open your browser and navigate to http://localhost:5000.
-
The application will open and you can start creating and editing bookmarks.
The application is already configured to use SQLite and the database file already exist (Bookmark.db). The following section show you the steps you need to do to use MySQL instead.
- Go to the project folder.
\> cd C:\FlickDBProject\FlickDBApp
- Open Data\ResidentBookmarkContext.cs and uncomment the optionsBuilder that use MySQL. Remove the double "/" in front of each lines so it look like this:
optionsBuilder.UseMySql(_database.GetConnectionString(connectionstring), new MySqlServerVersion(new Version(8, 0, 19)), mySqlOptions => mySqlOptions.CharSetBehavior(CharSetBehavior.NeverAppend));
- Next comment out the optionsBuilder section so that it will stop using SQLite. Add double "/" in front of the line so it look like this and save the file:
// optionsBuilder.UseSqlite(_database.GetConnectionString(connectionstring));
- Modify Properties\launchSettings.json with the environment you wish to use. Development is already used by SQLite so lets use staging.
"ASPNETCORE_ENVIRONMENT": "Staging"
- Open bookmarksettings.json and update the ConnectionString section for Staging:
"Staging": "server=localhost;port=3306;database=database;user=username;password=password"
Note: Use connection details related to your environment.
- Create the database.
\>dotnet ef migrations add CreateStagingDatabase -o Migrations\Staging \>dotnet ef database update
Important: You will need to have a MySQL server up and running before creating the database. Please find more information about installing MySQL Server on your system.
When done publishing the app, you need to deploy the published files to a folder on the hosting server. Then you need to set up a process manager that starts the app when requests arrive and restarts the app after it crashes or the server reboots. For configuration of a reverse proxy, set up a reverse proxy to forward requests to the app. For more information, read on how to host ASP.NET Core on Windows with IIS.
- Visual Studio Code - Code editor
- .NET Core SDK 7.0.100 - Open-source development platform
Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
Eric Lacroix - Initial work
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details