DEV Community 👩‍💻👨‍💻

Ayrton
Ayrton

Posted on

Stop lost your time with your web node deployment

Hi Webmasters !

Today I show you how to deploy your webapp on a serverless service.

After, many thank for your support in my last post !
https://dev.to/simerca/make-a-fast-auto-graphql-server-with-nodejs-and-postgres-in-5-minutes-146h

Let's started !

Did you know Vercel ?

Vercel.app is a service who sync your Github / Gitlab repo for easy deployment.
When you push on the master Vercel rebuild you'r project and deploy if passed the build step.

create your account
Vercel.app

The first step it's install Vercel CLI with this command:

npm i -g vercel
Enter fullscreen mode Exit fullscreen mode

Next Create a Node project, like a VueJS project.
exemple

vue create my-awesome-app
Enter fullscreen mode Exit fullscreen mode

inside your project set the repo:
exemple

git remote add origin https://gitlab.com/UserName/MyAwesomeProject
git add .
git commit -m "initial release"
git push -u origin master
Enter fullscreen mode Exit fullscreen mode

now inside your app project

vercel
Enter fullscreen mode Exit fullscreen mode

yes just this command without options can make the process of deployment easily

Vercel is awesome because you can set your domain for free ,but by default he give you a domain like xxxx.vercel.app for testing.

you can view log inside your dashboard
https://vercel.com/dashboard

Enjoy the powerful of serverless

Top comments (3)

Collapse
 
mzaini30 profile image
Zen

Now, default branch in Github is main not master.

Collapse
 
simerca profile image
Ayrton Author

Did you know another serverless services ?

Collapse
 
mzaini30 profile image
Zen

Github Pages with Github Action

🌚 Life is too short to browse without dark mode