DEV Community

Cover image for Note App - Part 1: Setup the Node API

Note App - Part 1: Setup the Node API

Akhila Ariyachandra on May 27, 2019

This was originally posted on my blog. Check it out if you want learn more about React and JavaScript! In this series we're going to create a no...
Collapse
 
talk2sohail profile image
Sohail • Edited

Your code is wonderful and comprehensive.
I have one question..
What is the purpose of 'cors' you used in index.js?
Thank you.

Collapse
 
akhilaariyachandra profile image
Akhila Ariyachandra

'cors' is needed if we're going to use the API from a different domain or port. Without 'cors' we won't be able to connect the API to any other apps, like the React app we're going to develop in the next post. As far as running the API in just this post, 'cors' isn't needed. Hope that helps!

Collapse
 
talk2sohail profile image
Sohail

Understood.
Thanks.

Collapse
 
syed456 profile image
syed

Hi Akhila Ariyachandra,
Please give me the link if you have made a next part of this series as you mentioned here
Thanks
Syed

Collapse
 
akhilaariyachandra profile image
Akhila Ariyachandra • Edited

Hi Syed, I just posted the second part on my blog.