yarn add react-native-configreact-native link react-native-config- Create
.envfiles for each configuration. Ex:.env.dev,.env.prod, etc Ex:
API_ENDPOINT=https://api.myresource.com/dev
ENV=dev
| #!/bin/bash | |
| : ${MJ_APIKEY_PUBLIC:="YOUR PUBLIC APIKEY HERE"} | |
| : ${MJ_APIKEY_PRIVATE:="YOUR PRIVATE APIKEY HERE"} | |
| : ${TEMPLATE:="291077"} | |
| : ${TO:='foo@bar.com'} | |
| : ${TO_NAME:='Testers'} | |
| : ${FROM:='bar@baz.com'} | |
| : ${FROM_NAME:='Your name'} | |
| : ${SUBJECT:="Email sent by script $0"} |
| # adb-to-bluestacks | |
| # if device is not found in Android Studio | |
| ./adb connect localhost:61031 | |
| # if device cannot connect to adb | |
| ./adb reverse tcp:8081 tcp:8081 |
| # command is $(git rev-parse --abbrev-ref HEAD) | |
| # source: https://stackoverflow.com/a/12142066/4895040 | |
| # use in commit to prefix branch | |
| git commit -m "$(git rev-parse --abbrev-ref HEAD): Test commit description" | |
| # usage in push | |
| git push origin $(git rev-parse --abbrev-ref HEAD) |
| npm install --unsafe-perm |
yarn add react-native-configreact-native link react-native-config.env files for each configuration. Ex: .env.dev, .env.prod, etc
Ex:API_ENDPOINT=https://api.myresource.com/dev
ENV=dev
| # 1. goto ZeroSSL https://app.zerossl.com/ | |
| # 2. goto New Certificate | |
| # 3. enter domain | |
| # 4. set 90-day cert for validity | |
| # 5. for CSR & Contact, generate a CSR on your server and use it to generate a private key. paste the CSR on the field. | |
| # 6. put the CNAME record generated through your DNS provider dashboard / portal | |
| # 7. wait for DNS validation | |
| # 8. download certificate files (Default or for NGINX) | |
| # 9. scp cert to server home, sudo cp to nginx directory | |
| # 10. install cert. use certificate.crt on nginx or see https://zerossl.com/help/installation/nginx/ |
| cat ~/.ssh/{keyname}.pub | clip.exe |
| gdown https://drive.google.com/uc?id= id from shareable link | |
| # source: https://github.com/wkentaro/gdown |
| app.get('/posts', async (req, res) => { | |
| // destructure page and limit and set default values | |
| const { page = 1, limit = 10 } = req.query; | |
| try { | |
| // execute query with page and limit values | |
| const posts = await Posts.find() | |
| .limit(limit * 1) | |
| .skip((page - 1) * limit) | |
| .exec(); |
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.