vue 创建自定义节点_使用Strapi创建自定义API-节点无头CMS

vue 创建自定义节点

Strapi is an amazing tool that lets us build our backends without writing a line of code. It comes with an API out of the box.

Strapi是一个了不起的工具,它使我们无需编写任何代码即可构建后端。 它带有现成的API。

I would use Strapi as a Headless CMS because it allows for flexibility in content types. We could build a custom app whereas other CMSs are geared towards blogs.

我将Strapi用作无头CMS,因为它允许内容类型的灵活性。 我们可以构建一个自定义应用程序,而其他CMS适用于博客。

While other Headless CMSs can be focused more on helping creating blogs (and that's perfectly fine), Strapi can be used to build more of an app than a blog. The ability to create all types of content is what gives Strapi this flexibility. We can also jump into the code of our Strapi installation and do more custom things like customizing our dashboard, making database queries, formatting content after an update, and programmatically sending emails.

虽然其他无头CMS可以更专注于帮助创建博客(这很好),但是Strapi可以用于构建比博客更多的应用程序。 创建所有类型的内容的能力使Strapi拥有了这种灵活性。 我们还可以跳入Strapi安装的代码,并执行更多自定义操作,例如自定义仪表板进行数据库查询在更新后格式化内容以及以编程方式发送电子邮件

The thing I love about Strapi is how easy it is to create your own custom APIs from whatever content you may have. Let's say we wanted to have a type of content called Pokemon. We could quickly build out our content fields and structure.

我对Strapi的爱好是,利用您可能拥有的任何内容创建自己的自定义API是多么容易。 假设我们想要一种名为Pokemon的内容。 我们可以快速建立我们的内容字段和结构。

Let's dig into using Strapi.

让我们深入研究使用Strapi。

安装 ( Installation )

There are a couple ways we can get started with Strapi.

我们可以通过几种方式开始使用Strapi

  1. Create a Strapi installation locally. Push to a server later

    在本地创建Strapi安装。 稍后推送到服务器
  2. Create a Strapi installation on a server

    在服务器上创建Strapi安装

If you wanted to work locally first, then you can create a Strapi application from the command line:

如果要先在本地工作,则可以从命令行创建Strapi应用程序:

# with yarn
yarn create strapi-app my-strapi-project --quickstart

# or with npx
npx create-strapi-app my-strapi-project --quickstart

Using the --quickstart flag will make Strapi use SQLite for its database. If you don't use --quickstart, you should install a local database like MongoDB.

使用--quickstart标志将使Strapi将SQLite用于其数据库。 如果您不使用--quickstart ,则应该安装一个本地数据库,例如MongoDB

We'll be starting with a base Strapi installation on a DigitalOcean server. We have an article on how to quickly Install Strapi with 1-Click on DigitalOcean. We also have a video of installing Strapi on DigitalOcean.

我们将从在DigitalOcean服务器上的基本Strapi安装开始。 我们有一篇关于如何通过DigitalOcean上的一键式快速安装Strapi文章 。 我们也有一个在DigitalOcean上安装Strapi的视频

Strapi入门 (

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值