api-translate-expressjs
v1.0.3
Published
Create a Translate Api from google with Express JS
Downloads
7
Maintainers
Readme
API Translate Express
Create a Translate Api from google with Express JS
Installation
git clone https://github.com/fitri-hy/api-translate-express.git
cd api-translate-express
npm install api-translate-expressjs
Create & Setup (.env)
# port
PORT='5000'
# rate 15 minute
LIMIT_RATE='15 * 60 * 1000'
# limit request
LIMIT_MAX='100'
# message over limit
LIMIT_MESSAGE='Too many requests from this IP, please try again later.'
Create & Setup (index.js)
require('api-translate-expressjs');
Run Project
node index.js
Api Endpoint
http://localhost:5000/translate?text=<query>&from=<fromLang>&to=<toLang>
Usage Example
http://localhost:5000/translate?text=cat&from=en&to=id
Support Language
Go to Language Code
Official Site: VISIT