Skip to content

Commit e4de67a

Browse files
committed
Merge branch 'main' of https://github.com/NFDI4Chem/nmrxiv-nodejs-microservice into prod-helm-deploy
2 parents 7551a8e + e14db44 commit e4de67a

File tree

7 files changed

+316
-200
lines changed

7 files changed

+316
-200
lines changed

.env.example

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ PORT=3333
22
HOST=0.0.0.0
33
NODE_ENV=production
44
APP_KEY=NZu-mbqukZjV_65cT3ckDB21exh17-ws
5-
DRIVE_DISK=local
5+
DRIVE_DISK=local
6+
NMRIUM_DEV_URL=https://nmriumdev.nmrxiv.org
7+
NMRIUM_PROD_URL=https://nmrium.nmrxiv.org/

.env.test

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
NODE_ENV=test
2+
NMRIUM_DEV_URL=https://nmriumdev.nmrxiv.org
3+
NMRIUM_PROD_URL=https://nmrium.nmrxiv.org/

.github/workflows/release-please.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
release-type: node
2929
package-name: release-please-action
3030
token: ${{ secrets.GITHUB_TOKEN }}
31-
prerelease: true
31+
prerelease: false

app/Controllers/Http/SpectraController.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,21 @@ export default class SpectraController {
4141
}
4242
return { relativePath: refURL.pathname, baseURL: refURL.origin }
4343
}, [])
44-
const state: NmriumState = (await readFromWebSource({ entries })) as NmriumState
44+
const state: NmriumState = (await readFromWebSource(
45+
{ entries },
46+
{
47+
onLoadProcessing: { autoProcessing: true },
48+
sourceSelector: { general: { dataSelection: 'preferFT' } },
49+
}
50+
)) as NmriumState
4551
return resolveState(state)
4652
}
4753

4854
private generateNMRiumURL() {
4955
const baseURL =
5056
Env.get('NODE_ENV') === 'development'
51-
? 'https://nmriumdev.nmrxiv.org'
52-
: 'https://nmrium.nmrxiv.org/'
57+
? Env.get('NMRIUM_DEV_URL')
58+
: Env.get('NMRIUM_PROD_URL')
5359

5460
const url = new URL(baseURL)
5561
const preferences = JSON.stringify({

env.ts

+2
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ export default Env.rules({
2121
APP_NAME: Env.schema.string(),
2222
DRIVE_DISK: Env.schema.enum(['local'] as const),
2323
NODE_ENV: Env.schema.enum(['development', 'production', 'test'] as const),
24+
NMRIUM_DEV_URL: Env.schema.string(),
25+
NMRIUM_PROD_URL: Env.schema.string(),
2426
})

0 commit comments

Comments
 (0)