- This is a guide on how to get your environment started without worrying about deployment
- Install Docker Desktop
- Open a terminal and run the following:
docker pull mcr.microsoft.com/mssql/server:2022-latest
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Hack4Impact" -p 1433:1433 -d --name sql_server mcr.microsoft.com/mssql/server:2022-latest
- Download Azure Data Studio to view db
- Install the Prisma VSCODE extension (helpful if changing database schema but not necessary)
- Run
yarn install
- Create .env file and ask us for what values to put in
DATABASE_URL=
SHADOW_DATABASE_URL=
- Create a database named ArtSphereInc locally by connecting to the docker database on Azure, create a new request, then running the command:
CREATE DATABASE ArtSphereInc;
- To start server run
yarn dev
- Open Azure Data Studio
- Click new connection
- Put following info in
server = artsphere-inc-server.database.windows.net
authentication type = SQL login
username = backenduser
password = Hack4Impact223
- Then click connect
- All the data under the ArtSphereInc database
- To view table you can right click table you want then click Select Top 1000
- Make sure the docker database is always running when you are developing or else can get errors
- Can open Docker Desktop to start and stop docker database
To update the schema, run the following and replace message
with a message of what you changed
npx prisma pull
npx prisma migrate dev --name message
npx prisma generate
- Using express-validator to authenticate api requests
- Docker not working for MAC
- Go to Settings, General, Use Rosetta for x86_64/amd