docs: https://data.storage.market
To run it, you need to connect to our intelligence database (prod only). You can make your own though we won't stop you.
DOCUMENT_DATABASE_NAME=xxxx
DOCUMENT_DATABASE_USERNAME=xxxx
DOCUMENT_DATABASE_HOST=xxxx
DOCUMENT_DATABASE_PORT=5432
DOCUMENT_DATABASE_PASSWORD=xxxx
IEX_CLOUD_PUBLIC_KEY=xxxx
A docker file is provided to make it easy to set up a local development database for testing. To do this,
- Ensure you have Docker installed and running
- Run the db start script
.dev/start.sh
- Source the environment file, which will cause the app to connect to the dev db,
source .dev/dev.env
You can stop the dev db by running .dev/stop.sh
DB tables will be persisted via a docker volume. You can purge all tables/data from the dev db by running
.dev/purge.sh
.dev/start.sh
(re-creates container).dev/start.sh
(run it a second time to start it up)
Once you have environment variables specified, run the server
npm install
npm run dev
If you need to run node script without running the server, use this example to get started
# creates the tables you need
npm run script create
# updates the tables
npm run script update
# scans for database, typically a daily cron job
npm run script scan
# analysis, typically a daily cron job.
npm run script analysis