Home week 52 summary
Post
Cancel

week 52 summary

19 Dec 2022 to 25 Dec 2022

Weekly forecast

  • Work on Resume and job hunting

I will fail often in order to succeed only once. —by OG Mandino

import will be changed to require(or add “type” : “module” to package.json)

import to be changed to require, export to be changed to module.exports = { foo } check Linkfor more details

node-fetch issue

latest version of node-fetch(as Dec 2022 version 3.30) does not support import with ‘require’

  • need to to :
    1. change to version 2 with npm i node-fetch@2, then use require, or
    2. use axios instead of fetch, or
    3. change other require to import with add “type” : “module” in package.json (do not forget to npm install)

google map API best practice

For google map that needs to be rendered in frontend, a restricted API Key is recommended to be used, refer to link

  • You can create multiple API keys with different restrictions to use them safely. For embedding a map, the Google Maps documentation has instructions for creating a correctly restricted API key so that it cannot be abused for other purposes at Get an API Key - Restricting API keys. It’s OK to include a restricted API key in your source code, because you cannot embed a map properly without doing that anyway.

restrict google map API key

AWS

S3

one zone infrequently accessS3 infrequent accessS3 glacier
30% cheapercheaper than S3 standardfor archive
zone down then no access  
  1. DocumentDB has a 400KB max to upload files.

Weekly summary

  1. API key can be stored as environment parameter on AWS as backend deployment(amplify can handle the environment variables).likn
This post is licensed under CC BY 4.0 by the author.