Ain't this article cute? (with all the pictures, icons, emojis):
https://dev.to/lenmorld/quick-rest-api-with-node-and-express-in-5-minutes-336j (my 5 stars to this author)
Golden statement from the author: Rest API means providing an API to clients via HTTP Methods
https://www.positronx.io/build-secure-node-js-mongodb-express-restful-api-from-scratch/
Also, other useful links while practicing these exercises:
https://medium.com/@alexishevia/using-cors-in-express-cac7e29b005b
All in all, to overcome the CORS issue while playing around with express & rest api:
npm install cors
In server.js...
let cors = require('cors')
server.use(cors())
This would set the Access-Control-Allow-Origin: *
https://alligator.io/react/axios-react/
No comments:
Post a Comment