Astro js 需要像 ExpressJS、Django 或 Flask 这样的后端框架吗?

huangapple go评论118阅读模式
英文:

Does Astro js need a backend framework like ExpressJS, Django, or Flask?

问题

Astro.js 是一种类似服务器的工具,可以与多个前端框架一起使用,比如 React,但是 astro.js 需要后端框架吗?

英文:

I know that Astro js is like a server that can use multiple front-end frameworks such as React, but does astro.js need a back-end framework?

答案1

得分: 3

不,您不需要后端框架来运行Astro。基本上,对于简单的项目,您甚至不必选择前端框架,只需使用内置功能,有很多选择。

来自文档

Astro是一款全功能的Web框架,具备构建网站所需的一切。

Astro包括组件语法,基于文件的路由,资源处理,构建过程,捆绑,优化,数据获取等等。您可以在不离开Astro的核心功能集的情况下构建出色的网站。

如果您需要更多控制,可以使用100多个集成来扩展Astro,如React、Svelte、Vue、Tailwind CSS、MDX、图像优化等等。只需一条命令,即可连接您喜爱的CMS或部署到您喜爱的主机。

英文:

No, you don't need a backend framework to run Astro. Basically, for simple projects you don't even have to choose a front-end framework as well, and just use built-in functionality, there is a lot to choose from.

From the docs:

> Astro is an all-in-one web framework that comes with everything you need to build a website.
>
> Astro includes a component syntax, file-based routing, asset handling, a build process, bundling, optimizations, data-fetching, and more. You can build great websites without ever reaching outside of Astro’s core feature set.
>
> If you need more control, you can extend Astro with over 100+ integrations like React, Svelte, Vue, Tailwind CSS, MDX, image optimizations, and more. Connect your favorite CMS or deploy to your favorite host with just a single command.

huangapple
  • 本文由 发表于 2023年2月9日 00:01:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/75388478.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定