Welcome to the Smartify project! This guide will help you get started by cloning the project, setting up your environment, and running it successfully.
Before you begin, ensure you have the following software installed on your machine:
-
Node.js: Smartify is built with Node.js, so make sure you have it installed. You can download it here.
-
Visual Studio Code: We recommend using VS Code as your code editor. You can download it here.
-
MySQL: The project uses a MySQL database. You can either set up a MySQL database on your localhost or use a cloud-hosted MySQL database.
Follow these steps to clone the project and get it up and running on your local machine:
- Clone the Smartify project from the GitHub repository:
git clone https://github.com/jasmit21/smartify.git
- Open the project directory in Visual Studio Code:
cd smartify
code .
-
In your terminal, navigate to the project folder
-
Install project dependencies using npm
You have two options for the database setup:
If you want to use the cloud-hosted database, you don't need to make any changes to the database configuration.
module.exports = {
development: {
username: 'your_cloud_username',
password: 'your_cloud_password',
database: 'your_cloud_database',
host: 'your_cloud_host',
dialect: 'mysql',
},
};
If you prefer to set up a local MySQL database, follow these steps:
-
Install MySQL on your machine and create a new database.
-
Update the database configuration in the project.
-
By adding a folder named
config/config.js
file. -
Replace the database host, username, and password with your local MySQL settings:
module.exports = { development: { username: 'your_local_username', password: 'your_local_password', database: 'your_local_database', host: 'localhost', // Change the host to 'localhost' dialect: 'mysql', }, };
- Once you've updated the database configuration, save the file.
With your environment set up and the database configured, you can start the Smartify application:
- In the project folder, run the following command to start the application using Nodemon:
nodemon index.js
- The application should now be running. You can access it in your web browser at
http://localhost:3000
.
You have successfully set up and launched the Smartify project on your local machine. You can now explore and use the application. If you encounter any issues or have questions, feel free to reach out for assistance. Happy coding!