params. id))}) //POST /books สร้างหนังสือ app. post ( '/books', ( req, res) => { books. push ( req. body) res. status ( 201). json ( req. body)}) //PUT /books/ 1 แก้ไขหนังสือไอดีที่ 1 app. put ( '/books/:id', ( req, res) => { const updateIndex = books. findIndex ( book => book. id) res. json ( Object. assign ( books [ updateIndex], req. body))}) //DELETE /books/ 1 ลบหนังสือไอดีที่ 1 app. delete ( '/books/:id', ( req, res) => { const deletedIndex = books. id) books. splice ( deletedIndex, 1) res. status ( 204). send ()}) app. listen ( 13000, () => { console. log ( 'Start server at port 13000. ')}) npm list -g --depth=0 ศึกษาเพิ่มเติม การ handle errors เช่น ถ้าเซฟลง database ไม่ได้จะส่ง response ไปบอกอย่างไร การ validate request เช่น ต้องส่งฟีลด์อะไรมาบ้าง แต่ละฟีลด์เป็นข้อมูลชนิดไหน การจัดโฟลเดอร์และไฟล์ เพราะตอนนี้เราเขียนอยู่ในไฟล์เดียว เมื่อโค้ดโตขึ้นจะแบ่งอย่างไรให้ใช้งานได้สะดวก การเขียน Document เพื่อบอกว่า API ของเรามีอะไรให้ใช้ได้บ้าง ต้องส่งอะไรมาบ้าง เพื่อให้ผู้ใช้สามารถนำไปใช้งานได้ Reference:
Install the Azure classic CLI | Microsoft Docs ข้ามไปยังเนื้อหาหลัก เบราว์เซอร์นี้ไม่ได้รับการสนับสนุนอีกต่อไป อัปเกรดเป็น Microsoft Edge เพื่อใช้ประโยชน์จากคุณลักษณะล่าสุด เช่น การอัปเดตความปลอดภัยและการสนับสนุนด้านเทคนิค บทความ 08/24/2021 3 นาทีในการอ่าน หน้านี้มีประโยชน์หรือไม่ มีข้อคิดเห็นเพิ่มเติมหรือไม่ คำติชมจะถูกส่งไปยัง Microsoft: โดยการกดปุ่มส่ง คำติชมของคุณจะถูกใช้เพื่อปรับปรุงผลิตภัณฑ์และบริการของ Microsoft นโยบายความเป็นส่วนตัว ขอขอบคุณ ในบทความนี้ Important This topic describes how to install the Azure classic CLI. The classic CLI is deprecated and should only be used with the classic deployment model. For all other deployments, use the Azure CLI. Quickly install the Azure classic CLI to use a set of open-source shell-based commands for creating and managing resources in Microsoft Azure. You have several options to install these cross-platform tools on your computer: npm package - Run npm (the package manager for JavaScript) to install the Azure classic CLI package on your Linux distribution or OS.
Set up your development environment - Office Add-ins | Microsoft Docs ข้ามไปยังเนื้อหาหลัก เบราว์เซอร์นี้ไม่ได้รับการสนับสนุนอีกต่อไป อัปเกรดเป็น Microsoft Edge เพื่อใช้ประโยชน์จากคุณลักษณะล่าสุด เช่น การอัปเดตความปลอดภัยและการสนับสนุนด้านเทคนิค บทความ 03/17/2022 3 นาทีในการอ่าน หน้านี้มีประโยชน์หรือไม่ มีข้อคิดเห็นเพิ่มเติมหรือไม่ คำติชมจะถูกส่งไปยัง Microsoft: โดยการกดปุ่มส่ง คำติชมของคุณจะถูกใช้เพื่อปรับปรุงผลิตภัณฑ์และบริการของ Microsoft นโยบายความเป็นส่วนตัว ขอขอบคุณ ในบทความนี้ This guide helps you set up tools so you can create Office Add-ins by following our quick starts or tutorials. You'll need to install the tools from the list below. If you already have these installed, you are ready to begin a quick start, such as this Excel React quick start. npm A Microsoft 365 account which includes the subscription version of Office A code editor of your choice The Office JavaScript linter This guide assumes that you know how to use a command line tool. Install is a JavaScript runtime you will need to develop modern Office Add-ins.