freeCodeCamp/guide/russian/certifications/apis-and-microservices/basic-node-and-express/serve-static-assets/index.md

17 lines
1006 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Serve Static Assets
localeTitle: Подавать статические активы
---
## Подавать статические активы
Статические веб-страницы довольно просты с экспрессом. Это может быть полезно для создания собственного веб-сайта или блога портфолио и т. Д.
Чтобы обслуживать статическую веб-страницу из папки «views», вы можете использовать код, например:
```javascript
const express = require("express");
const app = express();
app.use(express.static(__dirname + "/views"));
```
[Помогите нашему сообществу расширить эти подсказки и руководства](https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/apis-and-microservices/basic-node-and-express/meet-the-node-console/index.md) .