All files / server config.js

100% Statements 12/12
50% Branches 1/2
100% Functions 0/0
100% Lines 12/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44          3x 3x 3x 3x 3x 3x     3x 3x 3x         3x     3x                           3x            
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
 
 
// DIRECTORIES
const DIR = dirname(fileURLToPath(import.meta.url))
export const ROOT_DIR = join(DIR, '../')
export const AUDIO_DIR = join(ROOT_DIR, 'audio')
export const FX_DIR = join(AUDIO_DIR, 'fx')
export const PUBLIC_DIR = join(ROOT_DIR, 'public')
export const SONGS_DIR = join(AUDIO_DIR, 'songs')
 
// PAGES
export const CONTROLLER_PAGE = 'controller/index.html'
export const HOME_PAGE = 'home/index.html'
export const LOCATION = {
  HOME: '/home'
}
 
// PROCESS
export const PORT = process.env.PORT || 3000
 
// SOX
export const SOX = {
  AUDIO_MEDIA_TYPE: 'mp3',
  BITRATE_DIVISOR: 8,
  COMMANDS: {
    START: 'start',
    STOP: 'stop'
  },
  CONVERSATION: join(SONGS_DIR, 'conversation.mp3'),
  FALLBACK_BITRATE: '128000',
  FX_VOLUME: '0.1',
  SONG_VOLUME: '0.99'
}
 
// TYPES
export const CONTENT_TYPE = {
  '.css': 'text/css',
  '.html': 'text/html',
  '.jpg': 'image/jpeg',
  '.js': 'text/javascript',
  '.png': 'image/png'
}