Skip to content

Commit 0db1d0c

Browse files
committed
update 04
1 parent a817a9a commit 0db1d0c

44 files changed

Lines changed: 4812 additions & 2684 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

07-cloud/01-basic/02-azure-ftp/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,15 @@ const app = express();
3333
const staticFilesPath = path.resolve(__dirname, './public');
3434
app.use('/', express.static(staticFilesPath));
3535

36+
app.get('*', (req, res) => {
37+
res.sendFile(path.resolve(staticFilesPath, 'index.html'));
38+
});
39+
3640
const PORT = process.env.PORT || 8081;
3741
app.listen(PORT, () => {
3842
console.log(`App running on http://localhost:${PORT}`);
3943
});
44+
4045
```
4146

4247
We can run it on local:

07-cloud/01-basic/02-azure-ftp/server/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ const app = express();
55
const staticFilesPath = path.resolve(__dirname, './public');
66
app.use('/', express.static(staticFilesPath));
77

8+
app.get('*', (req, res) => {
9+
res.sendFile(path.resolve(staticFilesPath, 'index.html'));
10+
});
11+
812
const PORT = process.env.PORT || 8081;
913
app.listen(PORT, () => {
1014
console.log(`App running on http://localhost:${PORT}`);

07-cloud/01-basic/03-github-branch/server/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ const app = express();
55
const staticFilesPath = path.resolve(__dirname, './public');
66
app.use('/', express.static(staticFilesPath));
77

8+
app.get('*', (req, res) => {
9+
res.sendFile(path.resolve(staticFilesPath, 'index.html'));
10+
});
11+
812
const PORT = process.env.PORT || 8081;
913
app.listen(PORT, () => {
1014
console.log(`App running on http://localhost:${PORT}`);

07-cloud/01-basic/04-manual-render-deploy/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default defineConfig({
3030

3131
```
3232

33-
And router configuration:
33+
And restore router configuration:
3434

3535
_./src/core/router/router.ts_
3636

@@ -119,7 +119,7 @@ Configure web service:
119119

120120
![05-configure-runtime](./readme-resources/05-configure-runtime.png)
121121

122-
Clicks on `Create Web Service` button.
122+
Select `Free plan` and clicks on `Deploy Web Service` button.
123123

124124
After the successful deploy, open `https://<app-name>.onrender.com`.
125125

0 commit comments

Comments
 (0)