Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…roservice into prod-helm-deploy
  • Loading branch information
NishaSharma14 committed Mar 7, 2024
2 parents 7551a8e + e14db44 commit e4de67a
Show file tree
Hide file tree
Showing 7 changed files with 316 additions and 200 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ PORT=3333
HOST=0.0.0.0
NODE_ENV=production
APP_KEY=NZu-mbqukZjV_65cT3ckDB21exh17-ws
DRIVE_DISK=local
DRIVE_DISK=local
NMRIUM_DEV_URL=https://nmriumdev.nmrxiv.org
NMRIUM_PROD_URL=https://nmrium.nmrxiv.org/
2 changes: 2 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
NODE_ENV=test
NMRIUM_DEV_URL=https://nmriumdev.nmrxiv.org
NMRIUM_PROD_URL=https://nmrium.nmrxiv.org/
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
release-type: node
package-name: release-please-action
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
prerelease: false
12 changes: 9 additions & 3 deletions app/Controllers/Http/SpectraController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,21 @@ export default class SpectraController {
}
return { relativePath: refURL.pathname, baseURL: refURL.origin }
}, [])
const state: NmriumState = (await readFromWebSource({ entries })) as NmriumState
const state: NmriumState = (await readFromWebSource(
{ entries },
{
onLoadProcessing: { autoProcessing: true },
sourceSelector: { general: { dataSelection: 'preferFT' } },
}
)) as NmriumState
return resolveState(state)
}

private generateNMRiumURL() {
const baseURL =
Env.get('NODE_ENV') === 'development'
? 'https://nmriumdev.nmrxiv.org'
: 'https://nmrium.nmrxiv.org/'
? Env.get('NMRIUM_DEV_URL')
: Env.get('NMRIUM_PROD_URL')

const url = new URL(baseURL)
const preferences = JSON.stringify({
Expand Down
2 changes: 2 additions & 0 deletions env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ export default Env.rules({
APP_NAME: Env.schema.string(),
DRIVE_DISK: Env.schema.enum(['local'] as const),
NODE_ENV: Env.schema.enum(['development', 'production', 'test'] as const),
NMRIUM_DEV_URL: Env.schema.string(),
NMRIUM_PROD_URL: Env.schema.string(),
})
Loading

0 comments on commit e4de67a

Please sign in to comment.