From 3d22f94a761bd0c3fe0ead4296fdd27f98a76c26 Mon Sep 17 00:00:00 2001 From: MiracleUFO Date: Wed, 1 Nov 2023 22:34:22 +0100 Subject: [PATCH] chore: README edit --- README.md | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 60339a8..1f0ac1a 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ const Component = () => { ); } ``` -**NB:** Each non-void React element is translated like a paragraph, for best translation please avoid `
` and use `

` instead, and always end sentences with fullstop. +Each non-void React element is translated like a paragraph, for best translation please avoid `
` and use `

` instead, and always end sentences with fullstop. ### To translate specific text inline: ```jsx @@ -138,7 +138,7 @@ See [Usage](#to-get-translation-of-text-directly) ## Production Usage: The server for this package is very limited and may not meet your projects' needs, to aid package use in production: - **FORK** the server at this [repo](https://github.com/MiracleUFO/react-g-translator-proxy-express). - - **NB**: You will need a **MONGODB ATLAS CLUSTER** to run the server successfully. [Create one for free](https://www.mongodb.com/docs/guides/atlas/cluster), and assign the Atlas cluster's credentials to `MONGOOSE_ATLAS_CONNECTION_STRING` & `MONGOOSE_ATLAS_PASSWORD` in your **server's** environment file (keep this private.) + - You will need a **MONGODB ATLAS CLUSTER** to run the server successfully for rate limiting. [Create one for free](https://www.mongodb.com/docs/guides/atlas/cluster), and assign the Atlas cluster's credentials to `MONGOOSE_ATLAS_CONNECTION_STRING` & `MONGOOSE_ATLAS_PASSWORD` in your **server's** environment file (keep this private.) - Host the forked server. In the environment file(s) (`.env.*`) of the React project assign the hosted server's URL/address to `REACT_APP_TRANSLATE_SERVER_TOKEN`. - To enable authentication, you can protect your server by editing code in the server [repo](https://github.com/MiracleUFO/react-g-translator-proxy-express) see [this](https://christiangiacomi.com/posts/express-barer-strategy) for help, once authorisation code is running on server assign the server's authentication token to `REACT_APP_TRANSLATE_SERVER_TOKEN` in the React projects' environment file(s) (`.env.*`) - Also, if **delay** between requests is too long, remove [sleep](https://github.com/MiracleUFO/react-g-translator-proxy-express/blob/main/src/index.ts#L42) and/or edit [delay](https://github.com/MiracleUFO/react-g-translator-proxy-express/blob/main/src/utils/delayRequests.ts#L17-L19) in your server. diff --git a/package.json b/package.json index 9f0cde5..141f41a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@miracleufo/react-g-translator", - "version": "1.1.1", + "version": "1.1.2", "description": "A modern, free, lightweight npm package for translating react apps (component wrapper.) No API keys or language list files are required.", "author": "Miracle Ufodiama", "license": "MIT",