mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 07:36:39 +08:00
clean up
This commit is contained in:
parent
0b7ec0dd02
commit
666347de61
@ -1,2 +0,0 @@
|
|||||||
[config]
|
|
||||||
SCM_DO_BUILD_DURING_DEPLOYMENT=true
|
|
10
.vscode/settings.json
vendored
10
.vscode/settings.json
vendored
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"typescript.tsdk": "node_modules\\typescript\\lib",
|
|
||||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
|
||||||
"appService.zipIgnorePattern": [
|
|
||||||
"node_modules{,/**}",
|
|
||||||
".vscode{,/**}"
|
|
||||||
],
|
|
||||||
"appService.defaultWebAppToDeploy": "/subscriptions/d0ee7790-f4a6-480a-9c7c-9a9d45ce2dfc/resourceGroups/gpt/providers/Microsoft.Web/sites/sneezry-gpt",
|
|
||||||
"appService.deploySubpath": "."
|
|
||||||
}
|
|
@ -11,26 +11,7 @@ const nextConfig = {
|
|||||||
}); // 针对 SVG 的处理规则
|
}); // 针对 SVG 的处理规则
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
},
|
|
||||||
async redirects() {
|
|
||||||
if (!process.env.DOMAIN) {
|
|
||||||
return []
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
source: '/',
|
|
||||||
destination: `https://${process.env.DOMAIN}/`,
|
|
||||||
missing: [
|
|
||||||
{
|
|
||||||
type: 'host',
|
|
||||||
value: process.env.DOMAIN
|
|
||||||
},
|
|
||||||
],
|
|
||||||
permanent: true,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (process.env.DOCKER) {
|
if (process.env.DOCKER) {
|
||||||
|
16
server.js
16
server.js
@ -1,16 +0,0 @@
|
|||||||
const { createServer } = require("http");
|
|
||||||
const next = require("next");
|
|
||||||
|
|
||||||
const port = process.env.PORT || 3000;
|
|
||||||
const dev = process.env.NODE_ENV !== "production";
|
|
||||||
const app = next({ dev });
|
|
||||||
const handle = app.getRequestHandler();
|
|
||||||
|
|
||||||
app.prepare().then(() => {
|
|
||||||
createServer((req, res) => {
|
|
||||||
handle(req, res);
|
|
||||||
}).listen(port, (err) => {
|
|
||||||
if (err) throw err;
|
|
||||||
console.log(`> Ready on http://localhost:${port}`);
|
|
||||||
});
|
|
||||||
});
|
|
61
web.config
61
web.config
@ -1,61 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
This configuration file is required if iisnode is used to run node processes behind
|
|
||||||
IIS or IIS Express. For more information, visit:
|
|
||||||
|
|
||||||
https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config
|
|
||||||
-->
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<system.webServer>
|
|
||||||
<!-- Visit http://blogs.msdn.com/b/windowsazure/archive/2013/11/14/introduction-to-websockets-on-windows-azure-web-sites.aspx for more information on WebSocket support -->
|
|
||||||
<webSocket enabled="false" />
|
|
||||||
<handlers>
|
|
||||||
<!-- Indicates that the server.js file is a node.js site to be handled by the iisnode module -->
|
|
||||||
<add name="iisnode" path="server.js" verb="*" modules="iisnode"/>
|
|
||||||
</handlers>
|
|
||||||
<rewrite>
|
|
||||||
<rules>
|
|
||||||
<!-- Do not interfere with requests for node-inspector debugging -->
|
|
||||||
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
|
|
||||||
<match url="^server.js\/debug[\/]?" />
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<!-- First we consider whether the incoming URL matches a physical file in the /public folder -->
|
|
||||||
<rule name="StaticContent">
|
|
||||||
<action type="Rewrite" url="public{REQUEST_URI}"/>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<!-- All other URLs are mapped to the node.js site entry point -->
|
|
||||||
<rule name="DynamicContent">
|
|
||||||
<conditions>
|
|
||||||
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
|
|
||||||
</conditions>
|
|
||||||
<action type="Rewrite" url="server.js"/>
|
|
||||||
</rule>
|
|
||||||
</rules>
|
|
||||||
</rewrite>
|
|
||||||
|
|
||||||
<!-- 'bin' directory has no special meaning in node.js and apps can be placed in it -->
|
|
||||||
<security>
|
|
||||||
<requestFiltering>
|
|
||||||
<hiddenSegments>
|
|
||||||
<remove segment="bin"/>
|
|
||||||
</hiddenSegments>
|
|
||||||
</requestFiltering>
|
|
||||||
</security>
|
|
||||||
|
|
||||||
<!-- Make sure error responses are left untouched -->
|
|
||||||
<httpErrors existingResponse="PassThrough" />
|
|
||||||
|
|
||||||
<!--
|
|
||||||
You can control how Node is hosted within IIS using the following options:
|
|
||||||
* watchedFiles: semi-colon separated list of files that will be watched for changes to restart the server
|
|
||||||
* node_env: will be propagated to node as NODE_ENV environment variable
|
|
||||||
* debuggingEnabled - controls whether the built-in debugger is enabled
|
|
||||||
|
|
||||||
See https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config for a full list of options
|
|
||||||
-->
|
|
||||||
<iisnode watchedFiles="web.config;*.js"/>
|
|
||||||
</system.webServer>
|
|
||||||
</configuration>
|
|
Loading…
Reference in New Issue
Block a user