deploy next js on iis web server

  Рет қаралды 39,251

Ardi Nasiri

Ardi Nasiri

3 жыл бұрын

Briefly explained about create a next js app, install IIS on windows, setup IIS web server and deploy next js demo app on IIS web server.
usefull links:
1. Next js: nextjs.org/docs/getting-started
2. Node js: nodejs.org/en/
3. IIS node: github.com/tjanczuk/iisnode
4. URL Rewrite: www.iis.net/downloads/microso...
5. nextjs-server-azuresiteextension: github.com/MRCollective/nextj...

Пікірлер: 54
@jagpreetsingh8514
@jagpreetsingh8514 3 жыл бұрын
Thanks a ton Ardi for this video! I don't know how you managed to figure out all these configs!
@erickbroos7233
@erickbroos7233 3 жыл бұрын
he is the devil
@marioortiz5482
@marioortiz5482 Жыл бұрын
Thanks for your time sharing this excellent information.
@hariharanpanneerselvam1048
@hariharanpanneerselvam1048 2 жыл бұрын
Thank you very much. You saved my day :)
@carlossluzala9162
@carlossluzala9162 3 жыл бұрын
you saved my life haha, thank you very much!
@mrbamboo6134
@mrbamboo6134 2 жыл бұрын
hey @Ardi Nasiri, quick question. I need to deploy the app inside a server, Do i need to copy the whole folder including node_modules to the server or I can ignore that folder. Thanks for this amazinf tutorial
@thang1812
@thang1812 3 жыл бұрын
it's not working for my iis, instead of running on port 8080 (assign by iis), the nextjs app run on port 3000 (configured in code)
@_danisson
@_danisson 3 жыл бұрын
Can i use Next js Api routes and getStaticPath and getServerSideProps with IIS NODE?
@kshinfotube2730
@kshinfotube2730 7 ай бұрын
Thanks Ardi , its working properly , one doubt ,all code need to move published folder or publish next js files enough? any thanks for your support
@camilacardoso5394
@camilacardoso5394 2 жыл бұрын
Thank you very much!
@ArysOakheart-qz2wb
@ArysOakheart-qz2wb Жыл бұрын
thanks a lot well explained and easy
@phillucks4765
@phillucks4765 10 ай бұрын
how would you add nextJS into an existing IIS site, written in ASP Classic, to help with migration to React?
@kevindoumbe7506
@kevindoumbe7506 Жыл бұрын
Thank you very much for the videos. I have a problem it work very fine in my computer but when i want to access from another computer i have error "HTTP Error 404. The requested resource is not found". Please a solution ?
@eddyoe7350
@eddyoe7350 4 ай бұрын
Great video man, it hels me a lot!
@user-zm2hp4uw1h
@user-zm2hp4uw1h 3 жыл бұрын
thank you very much!
@m.n.rohidh2799
@m.n.rohidh2799 6 ай бұрын
It is not working for me ....................... Anyone pls help
@FullStackDevGreg
@FullStackDevGreg 8 ай бұрын
Please do you have an updated version next export is no longer recognized. Also I'm using a dynamic route do you have an example with that in consideration, Thank you
@user-bm5zt3nh4o
@user-bm5zt3nh4o 9 ай бұрын
Thanks Ardi, it works fine hosting it on IIS. However, there seems to be some issue when deploying it as a sub application under a website. Do you encounter any problems while deploying it under a website?
@user-ok5wr8kx9o
@user-ok5wr8kx9o 6 ай бұрын
Facing same issue , js files and CSS files are not loading
@user-sq1lc2sm3b
@user-sq1lc2sm3b 3 жыл бұрын
Thank you friend, you are just super! Can I ask you to shoot a video of further configuring IIS + Next.JS? Requests and responses, using any API, I would really appreciate it and catch up with your audience!
@user-cf9uv7cd4n
@user-cf9uv7cd4n 6 ай бұрын
hi thank you, my application pool stopped when I was browsing. Please any help is appreciated.
@jerviemarquez5192
@jerviemarquez5192 3 жыл бұрын
Hi, How to deploy it with SSL ?
@PP-ss3zf
@PP-ss3zf 2 жыл бұрын
THANK YOU
@thanatthanan.u
@thanatthanan.u Жыл бұрын
many thaks :)
@kamalmohamed3892
@kamalmohamed3892 Жыл бұрын
legend. great info. I follow the same in the video I stuck how did you make the server active, After I searched I found there is a node service which can make it alive. But the IIS part didn't work for me. can you do a same topic but explain verbally the steps. Also I am wondering is there is any way that we can not expose the source code when deploying ?! create-react-app has it build folder which is very easy to deploy and lightweight. can we have the same for Nextjs?
@vladmirobravo8978
@vladmirobravo8978 11 ай бұрын
Please, help me, i wont to know what node service a have to run to turn on the server. i'm stuck in this part.
@ocodista
@ocodista 3 жыл бұрын
I'm trying to follow this tutorial on windows server inside azure VM but I'm stuck at the iisnode internal server error. The windows features are different, it doesn't exist a category of Internet... Do you have any idea what could I do to make it work? This is the error message: [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use `node --trace-deprecation ...` to show where the warning was created)
@ocodista
@ocodista 3 жыл бұрын
@@ardinasiri9290 Thanks Ardi, it worked after I rebuilt the project and added NODE_ENV=production before node server.js (guess it was the web.config changes). Did you notice any performance issue with this approach? I have the feeling that it runs faster without the IIS but can't measure precisely why
@erickbroos7233
@erickbroos7233 3 жыл бұрын
thanks a lot
@q7314568
@q7314568 2 жыл бұрын
Thanks for this video!I got a issue about how to use https with next.js in iisnode,do u have any idea?
@ardinasiri9290
@ardinasiri9290 2 жыл бұрын
After you've set a project to use IISExpress, press F4 while the project is selected on the solution explorer to bring up the properties and in the properties set SSL Enable set true and under SSL URL set the URL with the port (443 in your case) you want for the SSL. This works for me without going under the hood and the self signed certificate was automatic. To run the project on that URL by default, you can right click on the project, select properties, then Web and replace the Project Url with localhost:443
@q7314568
@q7314568 2 жыл бұрын
@@ardinasiri9290 I use vs code,how could i enable SSL?
@verbient6045
@verbient6045 Жыл бұрын
Hey moro-on how do you build the app
@vinamraparashar5617
@vinamraparashar5617 3 жыл бұрын
How to deploy on GoDaddy cpanel without server file?
@DheaFadlia
@DheaFadlia 2 ай бұрын
wonder if can still use iisnode on iis 10
@mrchauhan5610
@mrchauhan5610 Ай бұрын
People have asked my questions but he hasn't replied. The Get is not working in IIS, works fine in local. For ex, I have created nextJs api (server.get() in server.js file) but getting error 404 when its called. In fact, i am getti g 404 even for favicons
@salarafshar
@salarafshar 3 жыл бұрын
i have a problem , when i add ``` ``` i get error 500 on browser !
@mahdidarzi8736
@mahdidarzi8736 3 жыл бұрын
hi, your problem has solved?
@codeheaven559
@codeheaven559 Жыл бұрын
do i need to copy only .next folder or whole src code into iis?
@ardinasiri9290
@ardinasiri9290 Жыл бұрын
It depend on static build or ssr build. for static build you should read this: nextjs.org/docs/pages/building-your-application/deploying/static-exports
@codeheaven559
@codeheaven559 Жыл бұрын
@@ardinasiri9290 Do we need to copy whole code in the server if its ssr build?
@Aragir
@Aragir 3 жыл бұрын
Thanks for the fantastic video! I'm getting 500.19 error... any ideas? I'm pretty sure the web.config is alright
@Aragir
@Aragir 3 жыл бұрын
@@ardinasiri9290 I'm curious about the folder you choose for the application if you were deploying a react application, you would choose the "build" folder, right? shouldn't, then, we choose the .next folder when deploying next js application?
@Aragir
@Aragir 3 жыл бұрын
Sorry, here I am again : ) iisnodes haven't been updated in a while... will this work for IIS 10?
@shahroozbazrafshan9228
@shahroozbazrafshan9228 Жыл бұрын
why you point the location of website to root project, shouldn't be in .next folder!, server.js to!
@aminsoraya4517
@aminsoraya4517 Жыл бұрын
through these steps I got HTTP Error 500.19 - Internal Server Error on an end point Why?
@jumanaeltrabelsi
@jumanaeltrabelsi 11 күн бұрын
Did you handle this problem
@frln16
@frln16 Жыл бұрын
Thank you for sharing this. Its wonderful! I am getting below error on IIS. I have used next-auth library for single sign on. Please save my life. Error: Please define a `secret` in production. MissingSecret [MissingSecretError]: Please define a `secret` in production Please help
@ardinasiri9290
@ardinasiri9290 11 ай бұрын
github.com/nextauthjs/next-auth/issues/3245 Define a secret like this: Add SECRET="MY_STRONG_SECRET" to your .env Replace MY_STRONG_SECRET with a strong secret generate by a tool like generate-secret.vercel.app/32 Add secret: process.env.SECRET, at the same level as the providers array to pages/api/auth/[...nextauth].js
@ootaguzta
@ootaguzta 2 жыл бұрын
config iis 12:52
@victor63666
@victor63666 2 жыл бұрын
Can i use Next js Api routes and getStaticPath and getServerSideProps with IIS NODE?
@ardinasiri9290
@ardinasiri9290 2 жыл бұрын
Did you try that?
@alanmarengo98
@alanmarengo98 Жыл бұрын
@@ardinasiri9290 Hi Ardi, my name is Alan. I am from Argentina. I am currently making an architecture change from react to next JS. I have an existential question. I really need to know if I can run a next application with ssr and isg with IISNode. And in case you ask me, no, I haven't tried it yet. But I always like to be cautious and have at hand all the answers to possible questions. I also saw vercel, and I know that deploying here is very easy. But my idea is to take advantage of a similar epic server with windows server 2019 that I also have with another application. Greetings from Argentina, Buenos Aires. Please, I await your response.
The BEST way to host Next.js websites
17:37
ByteGrad
Рет қаралды 28 М.
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 59 МЛН
Next.js For React Developers | Everything You Need To Know
28:57
Building and deploying Next.js applications with Docker
26:09
How To Deploy NextJS With Nginx and PM2
16:43
Full Stack Book
Рет қаралды 43 М.
Client-Side VS Server-Side Rendering - Data Fetching with Next.js
13:20
freeCodeCamp Talks
Рет қаралды 181 М.
Deploying NextJS app on Azure App Service
40:48
Munaga
Рет қаралды 17 М.
MAÎTRISE NEXTJS 13 : Créer et deploy une app Full-Stack Modern en Juste 4 Heures !
3:36:42
Melvynx • Apprendre à coder
Рет қаралды 27 М.
How to deploy a NextJS app on Digital Ocean instead of Vercel
20:47
Coding with Robby
Рет қаралды 5 М.