'How can I host my NextJS website on Winhost which supports IISnode?
Recently I developed a website using NextJS with some features like ISR and API Routes. Unfortunately, I purchased a hosting service called Winhost that is not especially for NextJS and only supports IISnode.
So, is there a way I can host my NextJS website without static exporting and retaining all the features?
Solution 1:[1]
At the end of the day a NextJS application on the server side is a NodeJS application, follow the steps here
- https://support.winhost.com/kb/a1534/node_js.aspx
- Make sure you select the right node version with your NextJS application - i.e downloading the right
node.exe - The mapping file seems to be important so nodejs apps are executed by IISNode
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="*.js" verb="*" modules="iisnode" />
</handlers>
</system.webServer>
</configuration>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ramakay |
