This MVP is an e-commerce app that sells NFTs.
- Run
npm installin project directory. This will install server-related dependencies such asexpress. cd clientand runnpm install. This will install client dependencies (React).
- Access the MySQL interface in your terminal by running
mysql -u root -p - Add a
.envfile to the project folder of this repository containing the MySQL authentication information for MySQL user. For example:
DB_HOST=localhost
DB_USER=root
DB_NAME=ecommerce
DB_PASS=YOURPASSWORD- Run the following commands to your MySQL console:
CREATE DATABASE ecommerce;and thenUSE ecommerce;. - Run
npm run migratein the project folder of this repository, in a new terminal window. This will create the required tables in your database: "payments", "orders", "users", "guests", "artists", "products", and "product_order". - Make sure you understand how the tables are constructed. In your MySQL console, you can run
DESCRIBE tablename;to see the structure of each table. Please mind that "tablename" inDESCRIBE tablename;needs to be replaced by the name of the table that you want to describe.
- Run
npm startin project directory to start the Express server on port 5000. - In another terminal, do
cd clientand runnpm run devto start the client in development mode with hot reloading in port 5173.