A Service (based on node.js and express framework). the project is service base64 to convert file (.pdf)
or images (.jpg, .jpeg, .png, .svg, .gif)
to base64.
to set the path to the directory containing the file or images
in the .env
- Convert
file (.pdf)
to base64 - Convert
image
to base64
- Download the dependencies with
yarn
package manager
yarn
#or
yarn install
- The website works on
http://localhost:process.env.PORT || 9090
OR bynodemon
which is run in development mode with monitoring of debugging terminal.
yarn run scripts
{
"scripts": {
"dev": "nodemon index.js 5050",
"start": "node index.js 9090",
"prod": "NODE_ENV=prod node index.js 9090"
}
}
src/config/env.js
PORT
NODE_ENV
PATH_FILE_PDF # ./src/assets/pdf or any path
PATH_FILE_IMAGE # ./src/assets/images or any path