This repository has been archived by the owner on Jan 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 21
Installation Guide
Casper edited this page Apr 16, 2021
·
13 revisions
Please make sure to have all of these installed!
- GIT
- NodeJS v14 (Must be v14 or you'll run into problems!)
- MySQL
- Open Command Prompt
- Run
git clone https://github.com/Dev-CasperTheGhost/snaily-cadv3
- Run
cd snaily-cadv3
- Run
npm install
and wait it to finish - Open the
src
folder - Make a copy of
config.example.ts
and rename toconfig.ts
- Modify that where needed
- Go back to your command prompt
- Once done modifying, create a new database in XAMPP phpmyadmin, call it
snaily-cad
or whatever you called it in the config file - Import
snaily-cad.sql
into that database - Go back to your command prompt and make sure you are in the main folder (snaily-cadv3/)
- Run
npm start
, this will start both client and server - Wait a few seconds until it logs "CAD IS RUNNING ON <port>"
- The CAD should be running on http://localhost:3030 by default
- Run
git pull origin main
in the root folder of the CAD/MDT- I get an error saying
Please commit or stash your changes
, please checkout the troubleshooting guide
- I get an error saying
- Run
npm install
also in the root folder of the CAD/MDT - Once that's finished you can start the CAD/MDT and all should be updated
- Make sure to have correctly installed SnailyCAD
- Install
pm2
globally:npm install -g pm2
- In the root folder, run
pm2 start npm --name snailycad -- run start
. This will start SnailyCAD in the background.- To stop:
pm2 stop snailycad
- To Restart:
pm2 restart snailycad
- To reload:
pm2 reload snailycad
- View logs:
pm2 logs snailycad
- Learn more about pm2
- To stop:
Make sure that you have some understanding of Docker/hosting. This is mostly for advanced users only.
Thanks to @bound2 for adding Docker support! (#117)
- Make sure that you have
Docker
installed on your machine (Download Docker) - Create a .env file in the
root
folder and add these values:- DB_HOST=database
- DB_NAME=snaily-cad
- DB_USER=root
- DB_PASSWORD=YOUR_DB_PW_HERE
- JWT_SECRET=YOUR_JWT_SECRET_HERE
- PROFILE=production
- Start it using
docker-compose --env-file .env up
(To run in the background:docker-compose --env-file .env up -d
) - Wait for the services to fully start, CAD should be running.
- CAD: http://localhost:3030
- PhpMyAdmin: http://localhost:8080
- Stop the CAD:
docker compose down --rmi=local
If you don't understand any of these steps, please join our support guild