Deploy NodeJs, MongoDB on Cyclic for Free - Detailed Guide

  Рет қаралды 32,415

Raddy

Raddy

Күн бұрын

Пікірлер: 97
@NotoriousGarbagePerson
@NotoriousGarbagePerson Жыл бұрын
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".
@timur7116
@timur7116 Жыл бұрын
Thank you Raddy, I've used your link to support you job
@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
@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!
@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.
@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!
@1a906b
@1a906b Жыл бұрын
Great tutorial, easy to understand and follow, thanks for the effort!
@RaddyDev
@RaddyDev Жыл бұрын
Glad you enjoyed it!
@JitendraKumar-bp7zq
@JitendraKumar-bp7zq Жыл бұрын
Thank You😊 Your video help me to deploy backend project
@RaddyDev
@RaddyDev Жыл бұрын
Glad to hear that
@mehmoodalam981
@mehmoodalam981 Жыл бұрын
Thanks bro, You have explained it clearly is short time.. Thank ypu so much!
@RaddyDev
@RaddyDev Жыл бұрын
I appreciate the comment, thank you!
@adriangarciasobrado7186
@adriangarciasobrado7186 Жыл бұрын
Amazing explanation Raddy! Thank you very much!!
@RaddyDev
@RaddyDev Жыл бұрын
My pleasure!
@diyvideos9737
@diyvideos9737 Жыл бұрын
I finally managed to deploy my app, thanks bro
@RaddyDev
@RaddyDev Жыл бұрын
No problem 👍
@huzaifakathi
@huzaifakathi Жыл бұрын
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 Жыл бұрын
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
@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
@haifalemontrees
@haifalemontrees Жыл бұрын
thank you for making this video it really helped me.
@lonewaters
@lonewaters Жыл бұрын
Great video❤❤
@allsamir2190
@allsamir2190 Жыл бұрын
Thank you for this amazing video BRO ❤❤
@ArushaAscendExpeditions
@ArushaAscendExpeditions Жыл бұрын
Very useful, Thanks
@neeola2567
@neeola2567 Жыл бұрын
Thank you so much, this was super helpful
@tarunrawal9950
@tarunrawal9950 Жыл бұрын
thank you nicely explained
@sergyyoubi3739
@sergyyoubi3739 Жыл бұрын
This video saved me!! Thank you so much.
@RaddyDev
@RaddyDev Жыл бұрын
You're welcome!
@adhilameenet
@adhilameenet Жыл бұрын
Helpful🤗
@shubhrajyoti1960
@shubhrajyoti1960 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@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)
@gamekentang6273
@gamekentang6273 Жыл бұрын
Hey raddy, i deploy my crud app but when i create data, error read only how i can fix this?
@RaddyDev
@RaddyDev Жыл бұрын
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
@franciscosalazar8116
@franciscosalazar8116 Жыл бұрын
Wow, this video was really helpful! Thanks you so much!
@RaddyDev
@RaddyDev Жыл бұрын
Glad it was helpful!
@ivanjeladincheva6669
@ivanjeladincheva6669 Жыл бұрын
Thank you so much! Very helpful!
@RaddyDev
@RaddyDev Жыл бұрын
Glad it was helpful!
@anchalmehandiratta8497
@anchalmehandiratta8497 Жыл бұрын
Thanks a lot for your video!
@miluoliveira
@miluoliveira Жыл бұрын
very useful! Thank you!
@RaddyDev
@RaddyDev Жыл бұрын
Glad to hear that!
@Zhenkaaf
@Zhenkaaf 11 ай бұрын
Can I deploy project where I use elephantsqlDB+postgres ? or only MONGODB ?
@RaddyDev
@RaddyDev 10 ай бұрын
You can do. The database that you use don't matter
@Zhenkaaf
@Zhenkaaf 7 ай бұрын
@@RaddyDev Hi! Thanks for hepl.. ciclic is closed.. Can you recommend some alternative to deploy progects ?
@RaddyDev
@RaddyDev 7 ай бұрын
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
@Ali-tm7ly
@Ali-tm7ly Жыл бұрын
Thank you so much !
@RaddyDev
@RaddyDev Жыл бұрын
You're welcome!
@parkin09kinder
@parkin09kinder Жыл бұрын
Yo man, thanks for this!
@RaddyDev
@RaddyDev Жыл бұрын
Happy to help!
@Codewithandi
@Codewithandi Жыл бұрын
hey bro i got this error after deploying "Cannot find module 'mongoose'"
@RaddyDev
@RaddyDev Жыл бұрын
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
@DieBaltischeMeeresgottin
@DieBaltischeMeeresgottin 11 күн бұрын
cyclic is shutting dow and it does not have ssh protocol anymore!
@RaddyDev
@RaddyDev 6 күн бұрын
Yep, sad. Render is another free option
@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😀😇
@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
Жыл бұрын
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?
@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
@abhishek__anand__
@abhishek__anand__ Жыл бұрын
Awesome Man
@HasimFN
@HasimFN Жыл бұрын
Does our node app have acces to the internet
@RaddyDev
@RaddyDev Жыл бұрын
Yeah widely available. Anybody can access it once is online
@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
@gauravbanerjee2898
@gauravbanerjee2898 Жыл бұрын
thx a lot buddy
@RaddyDev
@RaddyDev Жыл бұрын
Any time
@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
@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
@blueStarCanada007
@blueStarCanada007 Жыл бұрын
bro , thanks a lot,
@RaddyDev
@RaddyDev Жыл бұрын
Always welcome
@sernowodsk5963
@sernowodsk5963 10 ай бұрын
7:10 / 13:40
@dev.chhikara
@dev.chhikara Жыл бұрын
genuine
@shoqriz
@shoqriz Жыл бұрын
Thanks a lot!!
@RaddyDev
@RaddyDev Жыл бұрын
You're welcome!
@Driksenn
@Driksenn Жыл бұрын
Amazing! Thank you so much.
@vireltv256
@vireltv256 11 ай бұрын
Thanks a lot !!!
@RaddyDev
@RaddyDev 11 ай бұрын
No worries!
@iajes9650
@iajes9650 Жыл бұрын
THANK YOU
3 Alternatives for Heroku's Free Tier - Full Stack & API Hosting
13:04
Traversy Media
Рет қаралды 224 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Connecting NodeJS with MongoDB | Mongoose + Express
19:18
Piyush Garg
Рет қаралды 158 М.
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 220 М.
Deploy an Express API to Vercel
6:06
Coding Garden
Рет қаралды 83 М.
Do NOT Learn Kubernetes Without Knowing These Concepts...
13:01
Travis Media
Рет қаралды 336 М.
How to Set Up a Node.js Project
24:44
The Coding Train
Рет қаралды 78 М.
How to Deploy a Flask App and Postgres Database to Render
16:39
Pretty Printed
Рет қаралды 50 М.
What is Database Sharding?
9:05
Anton Putra
Рет қаралды 67 М.
Exploring React 19 Form Actions - Form Submission Made Easy!
21:30
HEROKU CANCELLED - Deploy FullStack NodeJS App To Render
20:32
ZinoTrust Academy
Рет қаралды 30 М.