@lakutata/template-web-react 3.0.0-beta.0 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lakutata/template-web-react",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.1",
4
4
  "description": "The React web template of the lakutata projects: an HTTP API serving a React single-page application built with Vite, deployed as a Docker image.",
5
5
  "keywords": [
6
6
  "lakutata",
@@ -1,7 +1,7 @@
1
1
  import {Application, type ILogger} from 'lakutata'
2
- import {installerConfig} from './config/Config.js'
2
+ import {config} from './config/Config.js'
3
3
 
4
4
  Application
5
- .run(installerConfig)
5
+ .run(config)
6
6
  .onLaunched((app: Application, log: ILogger): void => log.info('%s started in %s mode', app.appName, app.mode()))
7
7
  .onFatalException((error: Error, log: ILogger): void => log.error('The service cannot start: %s', error.message))
@@ -33,7 +33,7 @@ function uiDirectory(): string | undefined {
33
33
  * The options of the service
34
34
  * @param port the port of the HTTP server, the PORT environment variable or 8080 by default
35
35
  */
36
- export function installerConfig(port: number = Number(process.env.PORT ?? 8080)): ApplicationOptions {
36
+ export function config(port: number = Number(process.env.PORT ?? 8080)): ApplicationOptions {
37
37
  return {
38
38
  id: '{$APP_ID}',
39
39
  name: '{$APP_NAME}',
@@ -1,7 +1,7 @@
1
1
  import {after, before, describe, it} from 'node:test'
2
2
  import assert from 'node:assert'
3
3
  import {Application} from 'lakutata'
4
- import {installerConfig} from '../config/Config.js'
4
+ import {config} from '../config/Config.js'
5
5
 
6
6
  const PORT: number = Number(process.env.TEST_PORT ?? 18082)
7
7
 
@@ -12,7 +12,7 @@ describe('{$APP_NAME}', (): void => {
12
12
  before(async (): Promise<void> => {
13
13
  process.env.API_TOKEN = 'test-token'
14
14
  app = await new Promise<Application>((resolve: (app: Application) => void): void => {
15
- Application.run(installerConfig(PORT)).onLaunched((launched: Application): void => resolve(launched))
15
+ Application.run(config(PORT)).onLaunched((launched: Application): void => resolve(launched))
16
16
  })
17
17
  })
18
18