Skip to content

BEAR-finance/builder-server

 
 

Repository files navigation

Builder Server

Exposes endpoints for the Builder.

RUN

Check .env.example and create your own .env file. Some properties have defaults.

#Create database (Only the first time)
createdb <DatabaseName>

# Update env. The DEFAULT_USER_ID is important

# Update state
npm i
npm run migrate up

# Only once
npx ts-node ./scripts/parseS3Pools.ts
npx ts-node ./scripts/updateProjectThumbnails.ts

# On each asset pack change
npm run seed

# Start
npm start

Rewrites to S3

Also S3 but behind auth

Take into account that /v1/ correspond to the version that you specify in the file .env with API_VERSION

S3 structure

projects
|____PROJECT_ID
| |____manifest.json
| |____pool.json
| |____east.png
| |____north.png
| |____preview.png
| |____south.png
| |____thumbnail.png
| |____west.png
asset_packs
|____ASSET_PACK_ID.png
contents
|____HASH1
|____HASH2
|____HASH3

#Extra Info If you are usign windows subsystem, you will need to start the postgresql service each time

sudo service postgresql start

About

Builder app backend

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.5%
  • Other 0.5%