Deploy NodeJs, MongoDB on Cyclic for Free - Detailed Guide

  Рет қаралды 31,167

Raddy

Raddy

Жыл бұрын

In this video, I will show you how to deploy your NodeJs, MongoDB application on Cyclic.
Cyclic: app.cyclic.sh/#/join/RaddyThe...
Quick Guide: • Deploy Node.js and Mon...
Code: github.com/RaddyTheBrand/20.M...
☕ BuyMeACoffee: www.buymeacoffee.com/RaddyThe...
Discounts:
⚡ Hostinger: www.hostg.xyz/aff_c?offer_id=...
⚡ Elementor: be.elementor.com/visit/?bta=2...
Recording Equipment:
◾ Microphone: amzn.to/3uX0yvP
◾ Shotgun Mic: amzn.to/3aRsSJb
◾ Camera: amzn.to/3IMumkx
◾ Lens: amzn.to/3ARxvh8
◾ Lighting: amzn.to/3PBetj2
Computer Gear:
◾ Keyboard: amzn.to/3RCXRcC
◾ Headphones: amzn.to/3aIvskX
◾ Mouse: amzn.to/3VfVuxO
Connect with me:
◾ Website: www.raddy.dev
◾ Newsletter: www.raddy.co.uk/newsletter

Пікірлер: 96
@NotoriousGarbagePerson
@NotoriousGarbagePerson 7 ай бұрын
LOVE the video! it was quick, concise, and you werent constantly going back, like "oh, i think i have an error somewhere. im gonna spend 30mins looking for it and refuse to cut ahead".
@abdukayumsotvoldiev3432
@abdukayumsotvoldiev3432 Жыл бұрын
Thanks a lot Raddy. This tutorial is awesome! You showed us how to easily deploy MongoDB and expressJS on Cyclic together. Looking forward new productive videos.
@RaddyDev
@RaddyDev Жыл бұрын
Glad you enjoyed it!
@CyclicSh
@CyclicSh Жыл бұрын
Hey Raddy, thanks for making this cool tutorial and showing more folks how to use MongoDB and Cyclic together!
@diyvideos9737
@diyvideos9737 Жыл бұрын
Hope you will never follow in the footsteps of heroku 🤣🤣
@CyclicSh
@CyclicSh Жыл бұрын
@@diyvideos9737 As long as we exist, we'll have a free tier!
@bharatjagoar6092
@bharatjagoar6092 Жыл бұрын
i am not totally against cyclic sh but soon as i got to know that cyclic does not support socket io apps Man i got disappointed ! if any solution cyclic has ... i am glad to hear that
@1a906b
@1a906b Жыл бұрын
Great tutorial, easy to understand and follow, thanks for the effort!
@RaddyDev
@RaddyDev Жыл бұрын
Glad you enjoyed it!
@adriangarciasobrado7186
@adriangarciasobrado7186 Жыл бұрын
Amazing explanation Raddy! Thank you very much!!
@RaddyDev
@RaddyDev Жыл бұрын
My pleasure!
@mohd.saquibusmani953
@mohd.saquibusmani953 Жыл бұрын
Thanks bro, You have explained it clearly is short time.. I have also hosted my web-app with the help of this vedio
@EnzoScavone
@EnzoScavone Жыл бұрын
Was stuck for a while and found your tutorial. It worked. Thanks a lot!
@RaddyDev
@RaddyDev Жыл бұрын
Glad it helped!
@EnzoScavone
@EnzoScavone Жыл бұрын
@@RaddyDev Hey, I have been tinkering around with the API and I'm trying to call it with a React frontend. I'm stuck. I can call up the books data with a browser, but not with my frontend (which I'm hosting on Netlify). I checked your website, but couldn't find anything: do you have a tutorial that makes a React frontend that calls an API hosted on Cyclic (which then gets data from a MongoDB database... i.e. a MERN application)?
@RaddyDev
@RaddyDev Жыл бұрын
I only have a few tutorials on React, but I would like to start creating some. Saying this I just started a personal project that uses the same stack, excerpt I use Firebase for the front end. Since you have your API working, in React you only need to use Fetch or Axios to get and display your data. I used Axios on mine. Look into your browser console when you fetch data with React and see the error. You will most likely encounter a CORS error. This would mean that your API cannot be accessed via another Domain. In NodeJs, is super easy to allow CORS. Download the package and use the basic functionality to set it up. Then you'll most likely be able to get the data. After that you can make it better and maybe make your API only accessibly from your front end application domain hosted on Netlify. That's so nobody can abuse your API. Always happy to help, let me know how it goes. I am looking forward of making React and NodeJs tutorials
@EnzoScavone
@EnzoScavone Жыл бұрын
Hey@@RaddyDev , I've been tinkering around some more. I was researching how to allow CORS, got sidetracked and found this solution: Add this route on the backend in index.js: app.all('*', (req, res, next) => { res.header("Access-Control-Allow-Origin", "*"); next() }); Then, on the frontend, add this in the src/App.js file: axios // accessing Raddy's api .get("[raddy's api]/books", {headers: {'Content-Type': 'application/json'}}) .then((response) => { console.log(response);; }); with these lines added, no more error and I can see the data fetched from MongoDB in the console. Now, I just have to figure out how to display it in the browser... If anyone has questions how I did it, please ask. I'll try to check on this reply.
@neeola2567
@neeola2567 8 ай бұрын
Thank you so much, this was super helpful
@assem_ahmed
@assem_ahmed Жыл бұрын
thank you for making this video it really helped me.
@franciscosalazar8116
@franciscosalazar8116 Жыл бұрын
Wow, this video was really helpful! Thanks you so much!
@RaddyDev
@RaddyDev Жыл бұрын
Glad it was helpful!
@timur7116
@timur7116 11 ай бұрын
Thank you Raddy, I've used your link to support you job
@Driksenn
@Driksenn 9 ай бұрын
Amazing! Thank you so much.
@mehmoodalam981
@mehmoodalam981 10 ай бұрын
Thanks bro, You have explained it clearly is short time.. Thank ypu so much!
@RaddyDev
@RaddyDev 10 ай бұрын
I appreciate the comment, thank you!
@JitendraKumar-bp7zq
@JitendraKumar-bp7zq 10 ай бұрын
Thank You😊 Your video help me to deploy backend project
@RaddyDev
@RaddyDev 10 ай бұрын
Glad to hear that
@allsamir2190
@allsamir2190 6 ай бұрын
Thank you for this amazing video BRO ❤❤
@sergyyoubi3739
@sergyyoubi3739 Жыл бұрын
This video saved me!! Thank you so much.
@RaddyDev
@RaddyDev Жыл бұрын
You're welcome!
@ivanjeladincheva6669
@ivanjeladincheva6669 Жыл бұрын
Thank you so much! Very helpful!
@RaddyDev
@RaddyDev Жыл бұрын
Glad it was helpful!
@anchalmehandiratta8497
@anchalmehandiratta8497 10 ай бұрын
Thanks a lot for your video!
@emmasimonyan8386
@emmasimonyan8386 Жыл бұрын
Thanks so much for tutorial, since Heroku no linger free, it was great to find someone who shows how to use another platform
@RaddyDev
@RaddyDev Жыл бұрын
Glad it was helpful!
@tarunrawal9950
@tarunrawal9950 Жыл бұрын
thank you nicely explained
@ArushaAscendExpeditions
@ArushaAscendExpeditions Жыл бұрын
Very useful, Thanks
@parkin09kinder
@parkin09kinder Жыл бұрын
Yo man, thanks for this!
@RaddyDev
@RaddyDev Жыл бұрын
Happy to help!
@miluoliveira
@miluoliveira 11 ай бұрын
very useful! Thank you!
@RaddyDev
@RaddyDev 11 ай бұрын
Glad to hear that!
@diyvideos9737
@diyvideos9737 Жыл бұрын
I finally managed to deploy my app, thanks bro
@RaddyDev
@RaddyDev Жыл бұрын
No problem 👍
@adhilameenet
@adhilameenet Жыл бұрын
Helpful🤗
@lonewaters
@lonewaters 8 ай бұрын
Great video❤❤
@Ali-tm7ly
@Ali-tm7ly Жыл бұрын
Thank you so much !
@RaddyDev
@RaddyDev Жыл бұрын
You're welcome!
@abhishek__anand__
@abhishek__anand__ Жыл бұрын
Awesome Man
@shoqriz
@shoqriz 7 ай бұрын
Thanks a lot!!
@RaddyDev
@RaddyDev 7 ай бұрын
You're welcome!
@iajes9650
@iajes9650 9 ай бұрын
THANK YOU
@cyemezocode
@cyemezocode 6 ай бұрын
Helpful👍
@huzaifakathi
@huzaifakathi 6 ай бұрын
Hi Bro First of all i'll appreciate your work i love it, i just wanted to know that what you are using to auto-complete the command in terminal just like github auto-pilot autocomplete-style suggestions as you code. thanks in advance
@RaddyDev
@RaddyDev 6 ай бұрын
Powershell on Windows has a history of commands that I've entered before. Sometimes when I mess up the video and I have to re-record a the same part they pop up. Unfortunately it's nothing clever like autocomplete and thanks for the kind words
@gauravbanerjee2898
@gauravbanerjee2898 Жыл бұрын
thx a lot buddy
@RaddyDev
@RaddyDev Жыл бұрын
Any time
@mahfuzurrahman4517
@mahfuzurrahman4517 Жыл бұрын
bro , thanks a lot,
@RaddyDev
@RaddyDev Жыл бұрын
Always welcome
@gamekentang6273
@gamekentang6273 9 ай бұрын
Hey raddy, i deploy my crud app but when i create data, error read only how i can fix this?
@RaddyDev
@RaddyDev 9 ай бұрын
Read only is making me think that your MongoDB user doesn't have full permissions. Check your MongoDB Database User Privileges. It could be that
@weedzbutz9553
@weedzbutz9553 Жыл бұрын
Hii! I copied your tutorial step by step, but I keep getting Error: Failed to lookup view "list" in views directory "/var/task/views" when I try to open my URL link. Any ideas what I can do to fix this problem?
@RaddyDev
@RaddyDev Жыл бұрын
Do yo have that "list" file inside your views directory? Make sure you have the correct extinction - ejs, hbs, html... Whatever view engine that you are using
@shubhrajyoti1960
@shubhrajyoti1960 9 ай бұрын
I tried to deploy the nodejs notes app on cyclic, but it's saying: The application failed to start. Node.js v18.16.1 ERROR: Failed to run "npm run start". Start script defined in package.json: "scripts": { "start": "node app.js" ... Exited with code: 1 [CYCLIC] ERROR: No response from server on port 3000
@RaddyDev
@RaddyDev 9 ай бұрын
Cyclic does things a little bit different. You might need to rename your 'app.js' file to either 'server.js' or 'index.js'. Then you have to make sure that mongoose.connect is finished before allowing your app to serve requests. In your case, it might be that you comment out: //connectDB(); and replace it with: //Connect to the database before listening connectDB().then(() => { app.listen(PORT, () => { console.log("listening for requests"); }) }) They do have a good example on their documentation that might help. Hopefully, the steps above will just work for you
@shubhrajyoti1960
@shubhrajyoti1960 9 ай бұрын
@@RaddyDev did all the changes, but still getting errors. TypeError: OAuth2Strategy requires a clientID option at Strategy.OAuth2Strategy (/var/task/node_modules/passport-oauth2/lib/strategy.js:87:34) at new Strategy (/var/task/node_modules/passport-google-oauth20/lib/strategy.js:52:18) at Object. (/var/task/server/routes/auth.js:7:14) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Module._load (node:internal/modules/cjs/loader:960:12) at Module.require (node:internal/modules/cjs/loader:1143:19) at require (node:internal/modules/cjs/helpers:110:18) at Object. (/var/task/index.js:52:14)
@matthewajala3110
@matthewajala3110 Жыл бұрын
cron jobs in my code do not work on the cyclic server (though it works on local machine)....is there a fix for this please?
@RaddyDev
@RaddyDev Жыл бұрын
Best to look into their documentation as they might be doing something slightly different. They also have very active Discord page that you can check out. What error are you getting?
@matthewajala3110
@matthewajala3110 Жыл бұрын
@@RaddyDev Yeah, i contacted them and they said cron jobs work differently on their server,hence, i have to alter my code to work that way...However, i need my app to work the way i want it to work, so i switched to render😀😇
@vikasmenghani2477
@vikasmenghani2477 Жыл бұрын
thanks!
@RaddyDev
@RaddyDev Жыл бұрын
No problem!
@vikasmenghani2477
@vikasmenghani2477 Жыл бұрын
Please help me to deploy my handlebars (templating engine) , express, node. Js, mongodb website
@RaddyDev
@RaddyDev Жыл бұрын
​@@vikasmenghani2477 Sure, what do you need help with? Do you get an error? The process should be exactly the same
@andientertainment3438
@andientertainment3438 8 ай бұрын
hey bro i got this error after deploying "Cannot find module 'mongoose'"
@RaddyDev
@RaddyDev 8 ай бұрын
That's a strange one. Can you make sure that you have mongoose installed and you can see it in your package.json file? Check for typos as well
@yevhenfodorov121
@yevhenfodorov121 4 ай бұрын
Can I deploy project where I use elephantsqlDB+postgres ? or only MONGODB ?
@RaddyDev
@RaddyDev 4 ай бұрын
You can do. The database that you use don't matter
@yevhenfodorov121
@yevhenfodorov121 11 күн бұрын
@@RaddyDev Hi! Thanks for hepl.. ciclic is closed.. Can you recommend some alternative to deploy progects ?
@RaddyDev
@RaddyDev 11 күн бұрын
Try Render. Their website is pretty good and they have a lot of great services that you can use. To deploy NodeJs you need to create Web Service, you'll see it once you login. Also you can create a PostgreSql DB there as well
@naveenvashistha9692
@naveenvashistha9692 Жыл бұрын
how to push changes to your deployed app in cyclic
@RaddyDev
@RaddyDev Жыл бұрын
As default when you make changes to your GitHub repo it will redeploy automatically. You can also change your Auto Deployments from another branch if you wish. Look into the Environments tab, they have a lot of settings
@HasimFN
@HasimFN Жыл бұрын
Does our node app have acces to the internet
@RaddyDev
@RaddyDev Жыл бұрын
Yeah widely available. Anybody can access it once is online
Жыл бұрын
why my app don't save session after i logged in successfully
@RaddyDev
@RaddyDev Жыл бұрын
Which app is that? What are you using to save your sessions?
@sads8744
@sads8744 Жыл бұрын
hello ! will it work for ejs?
@RaddyDev
@RaddyDev Жыл бұрын
Hello! Yeah it will. You might want / have to store some of your static assets on another platform
@satisfying998
@satisfying998 Жыл бұрын
i want code please
@RaddyDev
@RaddyDev Жыл бұрын
Added the link under the description
@dev.chhikara
@dev.chhikara 11 ай бұрын
genuine
@vizzyspro3487
@vizzyspro3487 Жыл бұрын
cyclic not installing express
@RaddyDev
@RaddyDev Жыл бұрын
When you deploy your project, what is the error that you get? I've had many express projects on cyclic, it should work
@sernowodsk5963
@sernowodsk5963 3 ай бұрын
7:10 / 13:40
@vireltv256
@vireltv256 4 ай бұрын
Thanks a lot !!!
@RaddyDev
@RaddyDev 4 ай бұрын
No worries!
3 Alternatives for Heroku's Free Tier - Full Stack & API Hosting
13:04
Traversy Media
Рет қаралды 212 М.
I Stopped Using Express.js: Because Bun and Hono 🔥
10:23
Sam Meech-Ward
Рет қаралды 102 М.
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 158 МЛН
UFC 302 : Махачев VS Порье
02:54
Setanta Sports UFC
Рет қаралды 1,3 МЛН
Super gymnastics 😍🫣
00:15
Lexa_Merin
Рет қаралды 21 МЛН
How to Set Up a Node.js Project
24:44
The Coding Train
Рет қаралды 61 М.
Deploy NodeJS Application on AWS - Amazon Web Services | NodeJS
19:51
Connect MongoDB with Node.js using mongoose | MongoDB + Express.js
10:44
NodeJs Cron Jobs: A Comprehensive Guide | Node Schedule
17:18
How to Deploy a Django App and Postgres Database to Render
20:14
Pretty Printed
Рет қаралды 26 М.
How To Deploy MERN ECommerce On Ubuntu Using Hostinger VPS
26:49
Coding with Basir
Рет қаралды 44 М.
How to use Mongoose with Next js 14 +?
26:20
AyyazTech
Рет қаралды 4,8 М.
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 158 МЛН