Setup FCM to send notifications to user devices.
- Goto Firebase console, and create a project. Either select an existing GCP project or create a new one.
- Add the firebase SDK to server.
- Create and download private key.
- Rename it to
service-account.json
, and place it in root of the project or somewhere else and provide correct path (absolute one not relative) to the file in .env file.
cd project
# install dependencies
yarn
# create database and tables
yarn migrate
# start server
yarn dev
ALTER DATABASE peedia CHARACTER SET utf8 COLLATE utf8_general_ci;
SET foreign_key_checks = 0;
-- you have to convert each table seperately
ALTER TABLE banners CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE brands CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE cart CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE cart_details CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE category CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE category_items CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE codes CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE inventory CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE localbodies CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE offer_items CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE offers CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE order_details CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE orders CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE product_ratings CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE stocks CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE store_owners CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE store_ratings CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE stores CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE sub_category CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE sub_category_items CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE sub_sub_category CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE sub_sub_category_items CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE users CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
SET foreign_key_checks = 1;