Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Centralized Data Vault API #7

Merged
merged 9 commits into from
Oct 30, 2020
Merged

Centralized Data Vault API #7

merged 9 commits into from
Oct 30, 2020

Conversation

javiesses
Copy link
Contributor

  • Integrated Express DID Auth package (uploaded to my personal account)
  • Integrated Ipfs Cpinner Provider
  • Unit Tests
  • Authentication for POST/PUT/DELETE endpoints

Copy link
Contributor

@ilanolkies ilanolkies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat and tidy!

@@ -44,7 +44,7 @@ jobs:
- run: npm install
- run: npm run setup
- run: npm run build
- run: npm run lint
# - run: npm run lint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rising an issue for this

Comment on lines 46 to 60
createConnection({
type: 'sqlite',
database: env.database,
entities: Entities,
logging: false,
dropSchema: true,
synchronize: true
}).then(async (dbConnection: Connection) => {
const ipfsPinnerProvider = await ipfsPinnerProviderFactory(dbConnection, `http://${env.ipfsHost}:${env.ipfsPort}`)
setupApp(app, ipfsPinnerProvider, config, logger)

const port = process.env.DATA_VAULT_PORT || 5108

app.listen(port, () => logger.info(`Data vault service service started on port ${port}`))
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
createConnection({
type: 'sqlite',
database: env.database,
entities: Entities,
logging: false,
dropSchema: true,
synchronize: true
}).then(async (dbConnection: Connection) => {
const ipfsPinnerProvider = await ipfsPinnerProviderFactory(dbConnection, `http://${env.ipfsHost}:${env.ipfsPort}`)
setupApp(app, ipfsPinnerProvider, config, logger)
const port = process.env.DATA_VAULT_PORT || 5108
app.listen(port, () => logger.info(`Data vault service service started on port ${port}`))
})
const ipfsUrl = `http://${env.ipfsHost}:${env.ipfsPort}`
const port = process.env.DATA_VAULT_PORT || 5108
createConnection({
type: 'sqlite',
database: env.database,
entities: Entities,
logging: false,
dropSchema: true,
synchronize: true
}).then((dbConnection: Connection) => ipfsPinnerProviderFactory(dbConnection, ipfsUrl))
.then(ipfsPinnerProvider => setupApp(app, ipfsPinnerProvider, config, logger))
.then(() => app.listen(port, () => logger.info(`Data vault service service started on port ${port}`)))

@ilanolkies ilanolkies mentioned this pull request Oct 30, 2020
@ilanolkies ilanolkies merged commit 16a20d8 into master Oct 30, 2020
@javiesses javiesses deleted the dv-api branch October 30, 2020 18:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants