Translation API
Requirements • Setup and Run • Build Profiles • Dependencies • References
This project repository contains the implementation of a NodeJS-based translation server.
The purpose of this server is to demonstrate the ability to quickly master the basic knowledge of Node.js as the core technology for a cloud-based back-end solution.
The server consists of a Master
server and a Slave
server, which communicate with each other in a master/slave setup.
⚙ Setup, Build and Run
Requirements
Setup and run
To set up and run the application, use the following command:
npm start
Build Profiles
The project includes the following build profiles:
-
clean
Cleans the project by removing
yarn.lock
,package-lock.json
,node_modules
, andbuild
directory.npm run clean
-
compile
Compiles the TypeScript code using
tsc
command.npm run compile
-
format:check
Checks the formatting of the code using
prettier
andsort-package-json
commands.npm run format:check
-
format:fix
Fixes the formatting of the code using
prettier
andsort-package-json
commands.npm run format:fix
-
lint
npm run lint
Runs linting on the code using
eslint
command. -
prebuild
Runs the tests before the build process.
npm run prebuild
-
precompile
Fixes the code formatting before the compilation process.
npm run precompile
-
preformat:check
Installs dependencies and runs security audit before checking code formatting.
npm run preformat:check
-
preformat:fix
Installs dependencies and runs security audit before fixing code formatting.
npm run preformat:fix
-
prelint
Compiles the TypeScript code before running the linting process.
npm run prelint
-
prepreview
Runs linting before starting the preview.
npm run prepreview
-
prestart
Runs linting before starting the project.
npm run prestart
-
pretest
Runs linting before running the tests.
npm run pretest
-
start
Starts the application using
ts-node
.npm run start
-
test
Runs test using
jest
command.npm run test
-
test:only
Runs test using
jest
command.npm run test:only
📐 Architecture
Dependencies
- Language/architecture:
- Server:
- Quality inspection:
- Test:
References
2023 © Diego Rocha