Skip to content

Commit

Permalink
Merge pull request #336 from bcgov/dev-JC-NP-FOIMOD-3405
Browse files Browse the repository at this point in the history
Dev jc np foimod 3405
  • Loading branch information
nagarajaPC-AOT authored Sep 9, 2024
2 parents e1a857b + f65d7d3 commit b5364c8
Show file tree
Hide file tree
Showing 86 changed files with 21,758 additions and 16,815 deletions.
2 changes: 2 additions & 0 deletions api/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
build
19 changes: 19 additions & 0 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:22
# RUN npm install --python=python2.7
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app

WORKDIR /home/node/app

COPY package*.json ./
# COPY --chown=node:node package*.json ./

USER node

RUN npm install --legacy-peer-deps

COPY . .
# COPY --chown=node:node . .

EXPOSE 7085

CMD [ "node", "index.js" ]
4 changes: 2 additions & 2 deletions api/apiCaptcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var wav = require('wav');
var text2wav = require('text2wav');
var arrayBufferToBuffer = require('arraybuffer-to-buffer');
var streamifier = require('streamifier');
var lame = require('lame');
var lame = require('lamejs');

function captchaInit(options) {

Expand Down Expand Up @@ -156,7 +156,7 @@ function captchaInit(options) {
// we have to wait for the "format" event before we can start encoding
reader.on('format', function(format) {
// init encoder
var encoder = new lame.Encoder(format);
var encoder = new lame.Mp3Encoder(format);

// Pipe Wav reader to the encoder and capture the output stream
// As the stream is encoded, convert the mp3 array buffer chunks into base64 string with mime type
Expand Down
Loading

0 comments on commit b5364c8

Please sign in to comment.