Welcome to your new project! This guide will walk you through the steps to set up and run your project locally. The project consists of a frontend built with vanilla JavaScript, HTML, and Tailwind CSS, and a backend that needs to be run separately. Here's how you can get started:
To view and interact with your frontend application, you'll need to serve it using a local server. There are several ways to do this:
- Open your project in Visual Studio Code (VSCode).
- Ensure you have the 'Live Server' extension installed. If not, you can install it from the VSCode marketplace. This extension is developed by Ritwick Dey.
- Once installed, right-click the
index.htmlfile in your project. - Select 'Open with Live Server' from the context menu. You can also use the shortcut
Alt+L Alt+O. - Your default web browser should automatically open and display your frontend application.
- Install XAMPP or WAMP on your computer if you haven't already.
- Copy your project files into the 'htdocs' directory (for XAMPP) or 'www' directory (for WAMP).
- Start the XAMPP or WAMP server and ensure the Apache module is running.
- Open your web browser and navigate to
http://localhost/your_project_folderto view your project.
To ensure the full functionality of your frontend application, it is crucial to have the backend server running. This project utilizes Microsoft SQL Server (SQLEXPRESS) and is developed using .NET 6 with Entity Framework Core. Here's how to set up and run your backend server:
- .NET 6 SDK installed on your machine.
- Microsoft SQL Server (SQLEXPRESS) installed and running.
- A database named
TaskManagmentDBshould exist on your SQL Server instance. Create it manually using SQL Server Management Studio or another database management tool if it's not already there.
-
Open a Command Prompt or Terminal:
- Navigate to the backend directory of your project where the
.csprojfile is located.
- Navigate to the backend directory of your project where the
-
Configure the Connection String:
- Open the
appsettings.jsonfile. - Ensure the
ConnectionStringssection is correctly set:"ConnectionStrings": { "DefaultConnection": "Server=ComputerName\\SQLEXPRESS;Database=TaskManagmentDB;Trusted_Connection=True;" }
- Replace
ComputerNamewith the name of your computer or the server where SQL Server is running.
- Open the
-
Create and Apply Migrations:
- In the same directory as the
.csprojfile, execute the following command to create a new migration (if you haven't already):Replacedotnet ef migrations add InitialCreateInitialCreatewith a name that describes the migration. - Apply the migrations to update the
TaskManagmentDBdatabase:dotnet ef database update
- In the same directory as the
-
Run the Backend Server:
- Execute the command below to start the server:
dotnet run
- Execute the command below to start the server:
After completing these steps, your backend server will be up and running. Both the frontend and backend servers must be operational for the complete functionality of your project. Enjoy developing your application!
Once you have completed these steps, your backend server will be operational, and you can start using your frontend application. Remember to keep both the frontend and backend servers running for the full functionality of your project. Happy coding!
Link for the Backend Repository: https://github.com/FlorentZani/TaskManagment-Backend
Link for the Frontend Repository: https://github.com/FlorentZani/TaskManagement-Frontend