forked from mito-systems/sol-mem-gen
Compare commits
No commits in common. "sk-db-path-env" and "main" have entirely different histories.
sk-db-path
...
main
@ -26,5 +26,3 @@ WSOL_MINT_ADDRESS=So11111111111111111111111111111111111111112
|
|||||||
WSOL_LOCK_DURATION_IN_SECONDS=172800 # 48 hours
|
WSOL_LOCK_DURATION_IN_SECONDS=172800 # 48 hours
|
||||||
REWARD_MULTIPLIER=4
|
REWARD_MULTIPLIER=4
|
||||||
MAX_RETRIES_FOR_LOCK_TX=5
|
MAX_RETRIES_FOR_LOCK_TX=5
|
||||||
|
|
||||||
DB_PATH='./database.sqlite'
|
|
||||||
|
|||||||
@ -1,16 +1,12 @@
|
|||||||
import { DataSource } from 'typeorm';
|
import { DataSource } from 'typeorm';
|
||||||
import assert from 'assert';
|
|
||||||
|
|
||||||
export async function initializeDataSource() {
|
export async function initializeDataSource() {
|
||||||
try {
|
try {
|
||||||
const DB_PATH = process.env.DB_PATH;
|
|
||||||
assert(DB_PATH, 'DB_PATH not set');
|
|
||||||
|
|
||||||
console.log('Initializing Data Source');
|
console.log('Initializing Data Source');
|
||||||
|
|
||||||
const appDataSource = new DataSource({
|
const appDataSource = new DataSource({
|
||||||
type: 'sqlite',
|
type: 'sqlite',
|
||||||
database: DB_PATH,
|
database: './database.sqlite',
|
||||||
synchronize: true,
|
synchronize: true,
|
||||||
logging: false,
|
logging: false,
|
||||||
entities: [global.entities.Payment, global.entities.Tweet],
|
entities: [global.entities.Payment, global.entities.Tweet],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user