Thank you! After so many useless tutorials, your video was the quickest and easiest to follow!
@meiroverferst94824 жыл бұрын
YES!
@omscrx74904 жыл бұрын
Exactly. Thanks to this guy
@bag_of_pixels3 жыл бұрын
Why did you specify full path in "scripts" section like "./node_modules/.bin/netlify-lambda serve src"? It should be just "netlify-lambda serve src". Is there some specific reason for specifying full path?
@simon-olivierdesautels26192 жыл бұрын
Omg thank you
@zawwarahmed23362 жыл бұрын
Thank you very much
@David-ky6ns5 жыл бұрын
You don't mince words bruv. Straight, to the point, and accurate. well done.
@owenconti5 жыл бұрын
Thanks David
@sudheer-suri2 жыл бұрын
Windows: if you are Getting 'NODE_ENV' is not recognized error , just do npm install "npm install -g win-node-env" and also replace "./node_modules/.bin/netlify-lambda" to netlify-lambda in package.json
@abhitabhkumarpandey15132 жыл бұрын
Thanks a lot🙏
@footgame7568 ай бұрын
thank you man
@vishaldhawan4205 жыл бұрын
This is the simplest and the best tutorial for uploading NodeJS server to Netlify. Thanks dude!
@0000oooopppp5 жыл бұрын
Are these features free?
@owenconti5 жыл бұрын
Yes, up until certain page view limits. Check out Netlify’s pricing page
@peresola38854 жыл бұрын
Thanks for the video! I struggled a bit for a while because I was getting error when running npm start. It was because I was not tabing the line functions = "functions". So pay attention to that if you struggle too.
@Rasmuskvejborg6 ай бұрын
Tried that, but the functions folder never appeared.
@jaytee44313 жыл бұрын
The only resource I could find that helped me deploy to Netlify. Thanks Owen!
@Michelobe3 жыл бұрын
Great video! this is exactly what I was looking for. I followed the video exactly and got it deployed in 10 minutes, thanks again!
@leanbuzetabernasconi3 жыл бұрын
Hello great video but I have this when I run npm start: start > ./node_modules/.bin/netlify-lambda serve src '.' is not recognized as an internal or external command, operable program or batch file.
@yavuzyigitoglu12872 жыл бұрын
same here
@lucasangelozzi91692 жыл бұрын
You can try using 'npx netlify-lambda serve src'
@andrewv64452 жыл бұрын
delete the './node_modules/.bin/' part
@MrLeddfoot362 жыл бұрын
Thanks@@andrewv6445. Using "netlify-lambda build src" fixed this. Thanks
@dagmawinadew2882 Жыл бұрын
Hey brother how did the functions directory appear for you out of nowhere?
@codetoday5224Ай бұрын
😂😂 same bro , i am also thinking the same
@michaellussem17772 жыл бұрын
nice tutorial - thanks! Meanwhile the npm-script needs no longer the "./node_modules/.bin/" in front
@alkaribeats27642 жыл бұрын
This helped!
@jonjon56511 ай бұрын
ty bro
@ethancrabb4043 жыл бұрын
I'm getting a "'.' is not recognized as an internal or external command, operable program or batch file." error when running npm start. Anyone know any fixes?
@yosepalmanza80753 жыл бұрын
Did you fix it?
@simon-olivierdesautels26192 жыл бұрын
It should be just "netlify-lambda serve src".
@FredySandoval_1234 жыл бұрын
straight to the point, thanks this saves a lot of time.
@fadilnatakusumah1954 жыл бұрын
Great tutorial, thank you so much. Been looking for this after so many unclear and failed tutorial. You're awesome
@aczerobilly2 жыл бұрын
Hi, what do I do if my index html file is located into a different folder like “Views”
@ronpb39432 жыл бұрын
Have you solved this? In my case I don't even have an index.html file, I use a render engine, is there a way to deploy an app like that? (SSR)
@Roronoa1062 Жыл бұрын
@@ronpb3943 Exactly my issue , trying to deploy an app that has ejs pages using render engine
@goummoboris5194 Жыл бұрын
you created the functions without showing.. please is there any reason for this ?
@courtneypike2867 Жыл бұрын
Thank you so much! So helpful been stuck on this for a long time
@АйдынГалымжанулы11 ай бұрын
what is in folder "functions"? how did you created? and what is in that folder?
@savvasstephanides22103 жыл бұрын
Thank you Owen. This is the best tutorial I've found integrating Express with Netlify Functions. Thanks again!
@vuelancer3 жыл бұрын
quick and well-defined video for netlify express. Great buddy!
@ishraq953 жыл бұрын
whats inside functions folder? there is no functions folder in your git repo..
@Sariimativa4 жыл бұрын
im getting this problem : Can't resolve 'aws-sdk'. please help
@omerezra94812 жыл бұрын
I get this error: Support for the experimental syntax 'jsx' isn't currently enabled it doesn't work on react?
@sankalpadas78882 жыл бұрын
It is showing me this error: ModuleNotFoundError: Module not found: Error: Can't resolve 'mock-aws-s3' Someone pls help
@thomaskjr-rasmussen84975 жыл бұрын
This is super solid and well produced, cheers!
@bondys-video-kucing10 ай бұрын
superb brother Owen!
@omscrx74904 жыл бұрын
Wow brilliant. Been looking for some tutorial like this. Thanks so much
@vicky_s9992 жыл бұрын
But for me only files in that source directory is working, but my projects have multiple subdirectories. How to build files in those subdirectories ????
@libertad83y4 жыл бұрын
Excellent tuto, thanks, I have just this warning message when running but it still working nicely : "WARNING in ../node_modules/express/lib/view.js 81:13-25 Critical dependency: the request of a dependency is an expression @ ../node_modules/express/lib/application.js @ ../node_modules/express/lib/express.js @ ../node_modules/express/index.js @ ./api.js
@siddheshbhosale3311 Жыл бұрын
What is present inside 'functions' folder?
@someone112332 жыл бұрын
I am getting this error [ ModuleDependencyError: Can't import the named export 'Grammar' from non EcmaScript module (only default export is available)
@randy-russ4 жыл бұрын
Solid tutorial, to the point, no bullshit. Thanks !
@invinciblearmyvlogsshorts7911 Жыл бұрын
where can i keep my modals , in src or in the root folder
@refaatbitar5 жыл бұрын
Hey Owen, great video! but I tested your example with Ejs and it got me an error of "Cannot find module ejs" although it's included. I hope you can help me with that.
@vinibjazevich40593 жыл бұрын
Hey Owen I keep getting cors error when trying to make a get request from my front end. I enabled cors in express but that doesn't do anything. I also added [[headers]] for = "/*" [headers.values] Access-Control-Allow-Origin = "*" to my netlify.toml file.
@ThomasDaskalakis-j7i Жыл бұрын
Amazing video, clear & to the point. Thank you so much!
@ellisarmeanca22233 жыл бұрын
from where comes the function directory bro please im stuck ?
@mble4 жыл бұрын
3:40 Can I use npx instead?
@hafiztemuri24084 жыл бұрын
What your functions folder contain? Mine does not work until I manually add a folder 'functions/api' and copy all files in that folder. (I am using TS, so I have to copy all the JS generated files to functions/api, otherwise it does not work)
@owenconti4 жыл бұрын
Do the generated files create a /functions dir?
@hafiztemuri24084 жыл бұрын
@@owenconti when I run the serve command it does generate the folder and all the generated JS files in it. To get it working, I have to manually create functions/api folder and move all the files from functions to functions/api. Then it works.
@owenconti4 жыл бұрын
@@hafiztemuri2408 I haven't used TS with this, but you can try changing the `functions` directory in netlify.toml to point to your compiled functions folder, something like: functions = "dist/functions"
@hafiztemuri24084 жыл бұрын
@@owenconti I opened a github issue here, github.com/netlify/netlify-lambda/issues/350
@hafiztemuri24084 жыл бұрын
@@owenconti actually this seem to worked, I changed script to `"start": "tsc --outDir dist/api && netlify-lambda serve dist/api",` and `functions = "dist"`. Thanks for the suggestion!!!
@panjigemilang20775 жыл бұрын
Nice video sir! but I want to ask a question. I have a custom setting on my package.json for deploying a website on herokuapp : package.json "scripts": { "heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client" } ^ How can I run this on Netlify settings? because my folder structure didn't look like yours.
@cankp533 жыл бұрын
thank you for sharing. I taking an error like "Function invocation failed: Error: Cannot find module 'C:\_DEV\_FLUTTER\my-app\server\functions\api'" Have you any idea about it ?
@zancheema.youtube3 жыл бұрын
Thanks a lot man, this video really helped me. ❤️
@TOXICJUDGE7048862 жыл бұрын
'.' is not recognized as an internal or external command, operable program or batch file. there is an error how to overcome this???
@Rasmuskvejborg6 ай бұрын
delete the './node_modules/.bin/' part
@syedsaad317 Жыл бұрын
'.' is not recognized as an internal or external command, operable program or batch file.
@Rasmuskvejborg6 ай бұрын
delete the './node_modules/.bin/' part
@port80734 жыл бұрын
its telling me. The loader cant find the module
@nathandesign983 жыл бұрын
How can I do this but with MongoDB? I’ve been struggling for quite some time
@maximk78163 жыл бұрын
Yeah, I'm now trying to apply this with mongoose js.. and everything seems fine but doesn't work because of Mongo DB, throws an error _"ModuleNotFoundError: Module not found: Error: Can't resolve 'mongodb-client-encryption' in 'D:\JS_React\ToDoBook2 ode_modules\mongodb\lib'"_ UPDATE ..and I've just solved the problem by googling the error ))
@Hiteshisharma-f3w Жыл бұрын
I am not able to run locally. It is producing error > ./node_modules/.bin/netlify-lambda serve src '.' is not recognized as an internal or external command, operable program or batch file. Please help
@ErlandssonA Жыл бұрын
Maybe this is a bit late, but here is the fix: Change: "./node_modules/.bin/netlify-lambda serve src" To: "netlify-lambda serve src"
@@Roronoa1062 Yeah I think all of this is outdated
@satishkumar-hp4mu4 жыл бұрын
If i have done this in typescript, how can i convert it to use the what you have done?
@yuvrajagarkar89423 жыл бұрын
What is lambda , why can't we normally host like we do on heroku ?
@permanar_4 жыл бұрын
So basically we only need the netlify-lambda to make it work on netlify, right? Anyway, I have a question about the npm script, why did you call it directly from ./node-modules/ and not something like only netlify-lambda?
@owenconti4 жыл бұрын
I didn't know you could call local node modules without specifying the path!
@xiaowang16723 жыл бұрын
Thanks for the video. I deployed from my bitbucket. but It is failed. Deploy did not succeed: Deploy directory 'dist' does not exist. Could you let me know what's is the reason?
@cvbahir22842 жыл бұрын
Hello dear its awesome video but one question why create functions directory and in which files have so litle bit confusion.
@HarshNarwariya-p3z Жыл бұрын
you didn't mention about functions folder
@EugenKondratiev4 жыл бұрын
that`s great. thanks you! quick, simple and useful
@LordNases4 жыл бұрын
Thank you so much! Very simple and informative.
@pallavjadav3 жыл бұрын
Thank you Owen... that helped a lot
@yuraserdiuk95714 жыл бұрын
how work with express.static with netlify? I cannot get the correct URL for get the image. thanks for video
@saiminpyaekyaw3057 Жыл бұрын
how did you create functions folder?
@owenconti Жыл бұрын
It’s generated for you when you build the project
@s4lmon1345 жыл бұрын
What are the advantages to having an express app with a router separate to the front end if we are just using Netlify functions, wouldn't it make more sense just deploy your functions with your front-end in a "functions" folder which will create your endpoints based off whatever they are named automatically?
@owenconti5 жыл бұрын
I don't disagree. I think one of the advantages could be that you are able to utilize 3rd party packages that are written around express. For instance, maybe there's an express middleware that you use to log HTTP requests as an example. The video explains *how* to do it, not necessarily that you should/the use cases for it.
@askcode13304 жыл бұрын
how to deploy ejs developed website on netlify.how to ejs with netlify.Please provide me the solution.Thank you
@malikbrahimi75044 жыл бұрын
What about connecting a DB? Would you have to cloud host that elsewhere?
@owenconti4 жыл бұрын
Yep you’d have to host elsewhere and it wouldn’t be the fastest because of the latency between netlify servers and wherever the DB is hosted
@talbinyamin95074 жыл бұрын
Thanks for the great video!!! but i have a problem when i trying to fetch data from the API i rcving CORS err, could u oks explain how to fix it?
@adithyakamath82254 жыл бұрын
If running on Chrome, you can try adding the CORS Changer extension to your browser. Think it works for Firefox too. Why this error happens? -> I'm not sure.
@jeffpunts4 жыл бұрын
because when you use serverless, your express app is run in a browser environment instead of a node environment. most modern browsers do not allow websites to call APIs hosted across different domains.
@rezadwiputra14164 жыл бұрын
you can use cors package, by installing npm install cors, and use it in app like app.use(cors())
@cameronadams4366 Жыл бұрын
what if you don't want that string '.netlify/functions/api/' in your url ? What if you just want it to be /
@anusrim022 жыл бұрын
Hi Owen, your videos really helpful, but I get an error on npm start, '.' is not recognized as an internal or external command. Can you help me on that. Thanks!
@calebpena37292 жыл бұрын
instead of specifying a path in the script try: "netlify-lambda serve src"
@kaagman492 жыл бұрын
@@calebpena3729 Great answer i actually thought it had something to do with the script type because i write module type. I couldn't find an answer to this problem till i found your answer!
@Rasmuskvejborg6 ай бұрын
delete the './node_modules/.bin/' part
@kushaljain38705 жыл бұрын
What did you include in your functions directory? I dont know why you cut that part OR it was an error!
@owenconti5 жыл бұрын
You don't have to put anything in the functions directory. The netlify-lambda package automatically puts your compiled application from the src/ directory into the functions/ directory. It does this based on the netlify.toml configuration file.
@kushaljain38705 жыл бұрын
Oh See Media ohh ok. Thanks.
@joyalg91744 жыл бұрын
Very nice and quick video! Looks like you missed covering functions folder. did you create api.js under functions folder?
@owenconti4 жыл бұрын
It is automatically created for you by the netlify dev tool
@joyalg91744 жыл бұрын
@@owenconti ok got it. Thanks for the quick response!
@joyalg91744 жыл бұрын
I halva a mono repo with 2 project(angular & express). Is it possible to place netlify.toml file inside the express app instead of root? so that it wont affect my angular build.
@owenconti4 жыл бұрын
Set the base directory for each project in the Netlify UI, and then put each netlify.toml in the base directories
@hugoperez13184 жыл бұрын
Great video. My api works following these steps until I try to get information from a json database, I get a 500 Error message instead. Is this possible with netlify-lambda? It works locally but not on production.
@owenconti4 жыл бұрын
Are there logs you can look at to debug? Are the DB credentials correct?
@cmilner2 жыл бұрын
same issue for me - locally this works great, but as soon as it's deployed, I get a generic 500 error when trying to GET and POST. I'm using a simple file-based DB (diskdb)
@David-ky6ns5 жыл бұрын
Hello I actually have a question about Netlify, Are external API calls allowed on their free tier? Im trying to send mail with sendGrid when I make a POST request on a certain endpoint. The mail works with Node locally, Netlify local deploying but not Netlify hosting (on MYAPP.netlify.com) . please help. also the file is here github.com/Dada-Tech/portfolio-emailer-netlify/blob/master/src/api.js Thanks in advance !
@owenconti5 жыл бұрын
Hi David, I am not sure if Netlify blocks outgoing requests. Do you see any errors in the logs?
@David-ky6ns5 жыл бұрын
@@owenconti No, I dont see any errors. Maybe I'll just ask Netlify directly
@DuyTran-ss4lu2 жыл бұрын
It's freaking great. Thanks so much
@JohnJohn-uh2qv5 жыл бұрын
I lost at the last part, how did you deploy it to netlify, like uploaded the file, please show it.
@owenconti5 жыл бұрын
Hi John, you have to setup a new project on Netlify's side and point the project at your git repository. I show my configuration details at 4:44 in the video. Netlify will automatically build and deploy the application whenever you push changes to the repository.
@repuestosgse4513 Жыл бұрын
Hello, my friend, you did a great job, I'm not a Hindi speaker but I understood almost everything you did, I'm trying to deploy my project on Cyclic but I have an error that says this "Error: ENOENT: no such file or directory, stat '/var/task/client/dist/index.html'", I used Vitejs to start the client folder and I don't know if this is the main problem.
@canvaapplessons12244 жыл бұрын
What a lovely tutorial. Subscribed. Can you do a video on dockerization of Cordova/ionic app, like a build service to save time?
@aishwaryanr40724 жыл бұрын
Could you demonstrate hosting on netlify
@owenconti4 жыл бұрын
What kind of app are you looking to host on netlify?
@aishwaryanr40724 жыл бұрын
@@owenconti nodejs express
@rimidelcavlis4454 жыл бұрын
Hi... does not works here... Page Not Found :( It works in localhost only.
@rimidelcavlis4454 жыл бұрын
Resolved. Tank you! Great tutorial..
@vimuthsomarathna4820 Жыл бұрын
thanks a lot a very useful tutorial
@jerome69582 жыл бұрын
Great tutorial
@code_react5 жыл бұрын
Well you video is awesome but i have monodb connected to my app. how can i resolve my problem with mongodb. its giving me an error "Error: Can't resolve 'mongodb-client-encryption'"
@owenconti5 жыл бұрын
That sounds like the dependency is missing from package.json
@code_react5 жыл бұрын
@@owenconti Yep i forgot to install all the packages. thanks ;)
@code_react5 жыл бұрын
@@owenconti Hey there.. during deployment on Netlify. it gives me same error for modules missing. but i have pushed my updated code to github and still i am getting error. i have mongoose package name in my package.json file.
@owenconti5 жыл бұрын
@@code_react Do you have the 'mongodb-client-encryption' package in your package.json too?
@code_react5 жыл бұрын
@@owenconti No but i installed that package. but after uploading my node express app to netlify. all of my routes were not working in postman. I have used mongodb.
@lastmaj5 жыл бұрын
is this the only way to deploy an API written in node to netlify ? thanks though for the tutorial, it's the only viable thing I have found online
@owenconti5 жыл бұрын
Probably not the only way to use node with netlify, no. You can just use a pure node index.js file.
@dawid_dahl4 жыл бұрын
Awesome, thank you!
@owenconti4 жыл бұрын
You're welcome!
@xicorplayz9293 Жыл бұрын
its saying > netlify-express@1.0.0 build > ./node_modules/.bin/netlify-lambda build src '.' is not recognized as an internal or external command, operable program or batch file.
@AngelGrigoriou Жыл бұрын
Try just "netlify-lambda build src" instead of having the whole path
@vemuyaswanth8033 жыл бұрын
I'm now hopping with happiness
@Tomersss2224 жыл бұрын
Who else checked his speed setting to make sure it is on 'Normal'
@owenconti4 жыл бұрын
Ha, too fast?
@maximk78163 жыл бұрын
hey, buddy! 1 thanks for the tutorial - it works, 2 I have question: I've got a .env file in my project.. I cant share it Github right? So how do pass my variables to my app?? I mean in order to save it on Netlify..
@owenconti3 жыл бұрын
You'll define them in the Netlify UI. Search Google for Netlify .env vars
@maximk78163 жыл бұрын
@@owenconti thanks man, I've just successfully deployed my app!
@SilvaOnTube2 жыл бұрын
Well this was disappointing. I posted a question on the Netlify community forum. I edited the post to add what I thought might be a promising article, and my post was "temporarily" ??? removed. I hope this video will help me. I'll let y'all know.
@azimuddinahamed3 жыл бұрын
Thanks king
@dineshdhoni7470 Жыл бұрын
Thank you so much
@Tinwall725 жыл бұрын
Hi Owen How does post work?
@david50x842 жыл бұрын
Thanks for making the function folder off screen and never showing what's in it?
@owenconti2 жыл бұрын
It’s the compiled output. I never actually created it, the scripts do. But I apologize that the edit suddenly shows it
@omgupta90154 жыл бұрын
Is netlify free just like heroku?
@owenconti4 жыл бұрын
There is a free plan, yep
@UIGems4 жыл бұрын
Good one! Font is too small, you can change in next video
@symbianizemember60975 жыл бұрын
The title is how to deploy your express.js to netlify, but we cannot even see how to do that because it is already deployed in your netlify account. The tutorial is good but one of the important part is missing
@owenconti5 жыл бұрын
You don't have to do anything, that's the point of Netlify. Connect your Git repo, use the settings that I show in the video and you'll be set.
@akashrajum33194 жыл бұрын
Thanks a lot!
@victorjohn25452 жыл бұрын
So you can really deploy a dynamic website for free? Holy sheeeesh
@The_Nova_Glow4 жыл бұрын
bro, you completely skipped over the part where you created the 'functions' folder.
@owenconti4 жыл бұрын
nah bro. just run `npm start` and it's created automatically for you.
@sanidhyagupta003 Жыл бұрын
netlify-lambda is now depreciated in 2023.
@whitemsk83732 жыл бұрын
the functions directory just appeaed out of nowhere
@officialjosej90902 жыл бұрын
LMAO, Right
@Abhijeetkumar-yh8cy5 жыл бұрын
Please make it more elaborated. I was not able to follow.
@owenconti5 жыл бұрын
Which part did you get stuck on?
@Abhijeetkumar-yh8cy5 жыл бұрын
@@owenconti i got it after watching once again thank you very much.
@ЕвгенийМоскаленко-о4ы3 жыл бұрын
cool
@armanivers2 жыл бұрын
Everything works fine, but I'm trying to get rid of the "/.netlify/functions/api" in the url and just shorten it to "/". So far I've learned there is the way of using redirects from netifly. Either in the netifly.toml file or with _redirects file. Both solutions don't work for me, nothing gets redirected. Anyone has any idea?
@Dubsteperzify2 жыл бұрын
Did you find a solution?
@repuestosgse4513 Жыл бұрын
Hello, my friend, you did a great job, I'm not a Hindi speaker but I understood almost everything you did, I'm trying to deploy my project on Cyclic but I have an error that says this "Error: ENOENT: no such file or directory, stat '/var/task/client/dist/index.html'", I used Vitejs to start the client folder and I don't know if this is the main problem.