wellyhsu / emi_frontend

0 stars 0 forks source link

API使用方法 #1

Open yu-chenggg opened 1 year ago

yu-chenggg commented 1 year ago

Page裡面有用到call api的部分,全部做成function整理到一個地方一起處理,不能寫死ip在各個page裡面,你如果ip 換了就會有一大堆地方要改

另外像這種ip 或是一些固定的東西,寫成一個.env file 來管理

https://nextjs.org/docs/basic-features/environment-variables

wellyhsu commented 1 year ago

好的,我研究一下,謝謝學長!

yu-chenggg @.***> 於 2023年3月5日 週日 上午11:48寫道:

Page裡面有用到call api的部分,全部做成function整理到一個地方一起處理,不能寫死ip在各個page裡面,你如果ip 換了就會有一大堆地方要改

另外像這種ip 或是一些固定的東西,寫成一個.env file 來管理

https://nextjs.org/docs/basic-features/environment-variables

— Reply to this email directly, view it on GitHub https://github.com/wellyhsu/EMI/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4ZHB44PY2W666FCJJD2JDLW2QEKFANCNFSM6AAAAAAVP5NH6Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>