duofolio
duofolio copied to clipboard
Setup local dev environment
I was wondering if there was a readme or some documentation on how to set this application up locally so that others can extend upon it.
I've run into several issues due to missing dependencies
Hey @OGoodness, can you please give an example of what kind of issues you're running into?
@farshed At the moment it's just simple issues. I npm install, then try and run react-native. Unsure if it's setup to be run in a emulator, direct connect to hardware, using expo, or if it can run via web interface for testing.
Granted, this is kind of a user issue, but I was hoping that you could add something to the readme on how to set up the system locally. Whether that is a simple "Just npm install and run an emulator" But I feel like a guide would go a long way :D
Also, some info on what private.js should be, because that's another issue I had
Also, some info on what private.js should be, because that's another issue I had
Sorry, just realized that was a dumb question But documentation on what the constants should be would be good
@OGoodness It should be able to run in an android emulator/device after a simple npm install
. It's not using expo so you won't be able to run it via expo cli and neither on the web. You'll need to have the React Native setup configured in your system to run it. I'll take a look at it tomorrow morning and make sure that it's runnable after pull and npm install.
private.js contains a single function called translateApiUrl that takes three arguments:
- ISO 639-1 language code for the source language (string)
- ISO 639-1 language code for the target language (string)
- Text to translate (string)
It returns a url that can then be pinged to get a translation back. I'm thinking about making it visible in the repo but I'm not sure since it could lead to abuse if everyone found out.
@farshed
Much appreciated!
If it's using something like an API Key, then you could just make a Global Env Var and hide that
@farshed, out of curiosity, soes this private.js contains the API url/key to the Google Translate API?
@OGoodness, if you haven't set up the dev environment yet, this tutorial from RN's is quite good, I went through it just a week ago: https://reactnative.dev/docs/environment-setup
@rafaelsaback yes that's right
@rafaelsaback Thanks for the link 😄. I already had the Dev Env setup, but I agree it is pretty good. My main issue was with the constants and the fact that I was running everything on windows and trying to use a hardware device. I switched over to Linux and used a VM and got everything working.
I think if we setup a mock rest api , we would develop easily without worry about prod url or api key then i develop a code and i sent a pr #16 . if you accept pr, you could add constant/private to git, then you hide url on .env.prod file. we can use without compile error.
BTW I wish i develop a reader with built-in dictionary feature (with large amount of language support like google translate) so i am happy because i found this repo. there is a lot of pdf reader but i cant found turish dictionary. i hate switct reader to dictionary, over and over