Simple short and concise! Thank you for posting this tutorial. It's very helpful for someone who have little idea about how to host applications on cloud, especially with AWS where there are so many different options to configure a service
Thank you. This is very good starter! It's important for people who never ran such kind of APIs. Connection to instances and AWS security stuff can be difficult, and here provided very minimum but robust case. Like & use it guys.
Hi, I'm a novice and I just started an instance and successfully and my API 😊 The only hiccup I encountered was when I attempted to pull the github repo. I did not have a SSH or token. Once I created my personal token and was able to login I saw my tiny json object in the browser calling out to mama that it was running. Thank you!
Brother tu eres un CRANEO! I spent weeks on this and gave up. just couldn't do it. Ran through your tutorial and finally got it working in les than an hour. Would you happen to have anything similar for lambdas? either way you got yourself a like and a follow
Thank you for this tutorial Jonathan, it has been very clear and concise! Just one question. I'd like to keep the server running and connected permanent. How can I do that with AWS? Because in the moment I closed the terminal, the server shutted down. In this case, there isn't much difference with running it on localhost. Thank you in advance!
Beautiful! Thank You! I have 2 questions. (1) How can we set security headers, if I want to allow only one url to hit the API, though that is under dynamic IP protocol, so I cannot restrict inbound security to one IP? (2) How can I add a custom domain to this, so instead of the IP address we see a specific domain name? Thank you in advance for your insights!
Do the following at the root of your application: 1. cat > .env 2. paste your environment variables and exit. 3. nano .env to update your environment variables. I hope it helps ☺
At this stage, unfortunately is a manual process of pushing your changes to GH and pulling the changes from the server. But for true CI/CD we could use Github Actions to able to accomplish this, hope this gives some direction, but definitely a good next tutorial to create.
Very helpful 🙏🏼 I have two questions 1. If i want to call the API you published, do i need to use VPN or something? 2. How to connect that ec2 instance to dns service on AWS ? Thank you 👏🏼
For this one is a bit more involved, but here is an article that I wrote a while back, that might help. medium.com/@jonathans199/how-to-apply-ssl-for-https-to-node-express-api-in-aws-ec2-instance-acd43dcbfd4
very goo tutorial, very thank you i have one question i want the web server keeping run, but when i close the terminal, the webserver will turn off what can i do to keep web server running
Do the following at the root of your application: 1. cat > .env 2. paste your environment variables and exit. 3. nano .env to update your environment variables.
very good... But when i close the SSH/Putty terminal my application down too... How i do to stay UP application same i close de SSH or Putty terminal ?
Hope you got it resolved, but if you haven't, at the bottom of this article you will find how to persist the API running using a tool like PM2 jonathans199.medium.com/how-to-deploy-node-express-api-to-ec2-instance-in-aws-bc038a401156
I've upload my API to an EC2 instance, but the API only works if I access the machine using SSH and run the start command. How can I do my API run all the time?
yes except you'll have to use the Amazon AMI commands to install the missing packages, using yum but you could use this curl -o- raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash . ~/.nvm/nvm.sh nvm install node then install the version of node you need like this nvm install 16
I could be wrong but can't you copy the .env file from your system to the server directory inside the ec2 instance? It'll then be able to read the env file
Yes correct, you could copy your local .env file into the Ubuntu EC2 instance, but this could be a bit more involved, so you could just make a new .env file on the server and copy/paste the Environment variables there.
On my first attempt the intance worked fine. I created another inctance following the same steps. But API is not working. The URL (public IP address with port) doesn't simply respond even though I have included port number in IPv4 in inboud rules.
@17:30 when i hit my server after following your step by step and API responded. I was over the moon. Thanks
Hahaha I know the feeling 😎
i had a problem and took 5 days to figure out then i came in to this video and it is solved. Thanks man!
Man, please do not give up from posting videos, you are amazing.
Millions of thanks! I did it! My first interaction with AWS...
Simple short and concise! Thank you for posting this tutorial. It's very helpful for someone who have little idea about how to host applications on cloud, especially with AWS where there are so many different options to configure a service
Thanks for the message, glad it helped.... 👍
hi. i have some env variables and i dont know how to scp them in ec2 do you have any tutorial about that?@@Jonathansanchezdev
Thank you. This is very good starter! It's important for people who never ran such kind of APIs. Connection to instances and AWS security stuff can be difficult, and here provided very minimum but robust case. Like & use it guys.
Thank you so much!! I needed the security thing after creating the instance.
This is really cool, the way you built the entire project from scratch.
Dude i just wanted to thank you, this was extremely helpful. You are amazing man. Props
wow thanks for the message.... glad it helped 👍
I like this tutorial, to the point everything is straightforward.
thanks jonathan
Hi, I'm a novice and I just started an instance and successfully and my API 😊 The only hiccup I encountered was when I attempted to pull the github repo. I did not have a SSH or token. Once I created my personal token and was able to login I saw my tiny json object in the browser calling out to mama that it was running. Thank you!
really nice!!
i am using Xestjs and i was wondering how to deploy my API, your video is really helpfull
I loved this very stright forward exactly what i was looking for. I appreciate you not waisting time with extra stuff.
concise and easy Thanks man
This is a great video the one thing that would be great to see is how to add env variables. Thanks again
thanks brother, I followed along and everything is working perfectly, very appreciated
thank you very much. It's a very helpful video. Separate thanks for an article :)
Glad it help Lucy 👍
Thanks for such wonderful explanation.
Thank you Jonathan. Your explanation was clear and very helpful.
17:23 IS VERY HELPFUL. THANK YOU
You made a developer. I love you
after 48 hrs of trying to figure out some other outlandish solutions, this video worked for me! GC -> AWS
God tier video! Helped me so much thank you!!
Greatly explained ❤
Wow! Beautiful step by step tutorial. Thank you.
Glad it was helpful! 👍
great article.. worked. video not quite match medium article... trusting the medium article (PM2)
Sos un genio!! Saludos desde Argentina
bro thank you so much it was the best working explanation about EC2 deployment. Helped a lot!
You are amazing☺
well explained👍👍
Simple and to the point, great explanation.
thank you so much, this was very straightforward and clear
thank you very much, it helped me a lot. It was very clear
You very are welcome! Glad it helped
Great, useful, precise, efficient staff. Worth promoting.
Great clean instructions. Very helpful.
Great video man! This was my second time using your video. I'm sure there'll be lots more! God bless
Amazing tutorial!!! Thank you so much
Your videos are awesome!
Glad you enjoyed them, I have more coming out soon....
Thanks man! I though technology was just against me.
Thanks a lot sir, really amazing video
Omg you are such a great help to me thanks
Happy to help!
Great video mannn, thank you!
Brother tu eres un CRANEO! I spent weeks on this and gave up. just couldn't do it. Ran through your tutorial and finally got it working in les than an hour. Would you happen to have anything similar for lambdas? either way you got yourself a like and a follow
Great video, helped a lot!
Very good tutorial! Thank you!
Thanks a lot for the video
I love this, straight to the point 👍
Thanks a lot, this really helped and I learnt a lot.
Thanks a ton man! This really helped walk a beginner like me through :)
Great explanations and amazing efforts, one question though how to keep running the server even after closing the terminal??
great tutorial!
This is wonderful!
nicely done!
Good job !!! Thank You!
wow amazing tutorial!!, thanks a lot!
Thank you for this tutorial Jonathan, it has been very clear and concise!
Just one question. I'd like to keep the server running and connected permanent. How can I do that with AWS? Because in the moment I closed the terminal, the server shutted down. In this case, there isn't much difference with running it on localhost. Thank you in advance!
That's where you have to use pm2..
Amazing tutorial!!!
Beautiful! Thank You! I have 2 questions. (1) How can we set security headers, if I want to allow only one url to hit the API, though that is under dynamic IP protocol, so I cannot restrict inbound security to one IP? (2) How can I add a custom domain to this, so instead of the IP address we see a specific domain name? Thank you in advance for your insights!
thank a lot your works. You realy gave me hope ^^
DIos mío no sé cómo agradecerte me funcionó luego de mucho quebradero de cabeza INFINITAS GRACIAS!!!!!!
Wow que, lindo mensaje, gracias....
great!!
thankyou for the video
Thank you very much
thank you so much
Is there a way to use port 80 for don't specify the port?
you are amazing
much thanks
Thank you sir
this is video i liked, what certifcation i doing for find job :3
trank you very much
awesome step by step process.. i have a challenge.. my app has env variables..how do i sort that
Do the following at the root of your application:
1. cat > .env
2. paste your environment variables and exit.
3. nano .env to update your environment variables.
I hope it helps ☺
Good tutorial thanks a lot. How do you handle re deploying updates?
At this stage, unfortunately is a manual process of pushing your changes to GH and pulling the changes from the server.
But for true CI/CD we could use Github Actions to able to accomplish this, hope this gives some direction, but definitely a good next tutorial to create.
Very helpful 🙏🏼
I have two questions
1. If i want to call the API you published, do i need to use VPN or something?
2. How to connect that ec2 instance to dns service on AWS ?
Thank you 👏🏼
Hey, great video, but when I close my terminal it stops working, how do i keep it running all the time?
how to add env variables?
So basically you'll need to create the .env file manually on the server via nano or vim. Let me know if that makes sense.
@@JonathansanchezdevThank you! It makes complete sense. Ill try nano :) Thank you!
Fantastic! is there a Windows pc demo or source?Thanks
how to set up the https for the bare ip address because it is running on http
For this one is a bit more involved, but here is an article that I wrote a while back, that might help.
medium.com/@jonathans199/how-to-apply-ssl-for-https-to-node-express-api-in-aws-ec2-instance-acd43dcbfd4
if you want to access it with HTTPS, is a load balancer required?
Do you know how to fix SSL not working? I can access the IP with http but not https
very goo tutorial, very thank you
i have one question
i want the web server keeping run, but when i close the terminal, the webserver will turn off
what can i do to keep web server running
Same question i have.
you need to use PM2, he left those steps on his medium article link in his description
hello brother,
I have a question where I can find the .env file in node js ec2 AWS ubuntu instance and how I can update it
Do the following at the root of your application:
1. cat > .env
2. paste your environment variables and exit.
3. nano .env to update your environment variables.
I have a question.. If I launch an EC2 instance like this and I hit aprox 50-100 requests will it start charging me?
It works your a genius, but now how do i do to leave it running while i close aws?
never mind i found it in your medium article thanks man
very good... But when i close the SSH/Putty terminal my application down too... How i do to stay UP application same i close de SSH or Putty terminal ?
Hope you got it resolved, but if you haven't, at the bottom of this article you will find how to persist the API running using a tool like PM2
jonathans199.medium.com/how-to-deploy-node-express-api-to-ec2-instance-in-aws-bc038a401156
Thank you sir.
I'm getting Cannot GET / error, what to do?
I've upload my API to an EC2 instance, but the API only works if I access the machine using SSH and run the start command. How can I do my API run all the time?
Hi thank you for the tutorial. How about amazon linux aws ? Is it the same process? ?
yes except you'll have to use the Amazon AMI commands to install the missing packages, using yum
but you could use this
curl -o- raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install node
then install the version of node you need like this
nvm install 16
How will I set environment variables in ec2 instance? Will I create another .env file in the ec2 instance?
Did you figure it out?
I could be wrong but can't you copy the .env file from your system to the server directory inside the ec2 instance? It'll then be able to read the env file
Yes correct, you could copy your local .env file into the Ubuntu EC2 instance, but this could be a bit more involved, so you could just make a new .env file on the server and copy/paste the Environment variables there.
could you please make same thing for golang API..?
Super!
Api Not working with production frontend
but this link not working with
what to do
it worked only one time can you help now when i try it says unable to connect
is free to use it?
On my first attempt the intance worked fine. I created another inctance following the same steps. But API is not working. The URL (public IP address with port) doesn't simply respond even though I have included port number in IPv4 in inboud rules.
Did you fix that ?
If yes, how did you?
@@sivaharishm314 It looks like instance was working fine. I just copied the IPv4 address and pasted into the browser. It worked!
genio
Gracias ojala te aya servido de algo
Te amo
You did not use PM2
like
but how can we use it on front end it gives cors error not secure