Skip to content

Commit

Permalink
セルフホホスティングの手順を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinhalite committed Apr 24, 2024
1 parent fe3eff5 commit 0513171
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ It helps you to use microCMS from JavaScript and Node.js applications.

### Install

Install npm package.
#### Node.js

> [!IMPORTANT]
> v3.0.0 or later requires Node.js **v18 or higher**.
Install npm package.

```bash
$ npm install microcms-js-sdk
Expand All @@ -21,8 +20,21 @@ or
$ yarn add microcms-js-sdk
```

> [!WARNING]
> The hosting service (unpkg.com) is not related to microCMS. For production use, we recommend self-hosting on your own server.
> [!IMPORTANT]
> v3.0.0 or later requires Node.js **v18 or higher**.
#### Browser(Self-hosting)

Download and unzip `microcms-js-sdk-x.y.z.zip` from the [releases page](https://github.com/microcmsio/microcms-js-sdk/releases). Then, host it on any server of your choice and use it.
The target file is `./dist/umd/microcms-js-sdk.js`.

```html
<script src="./microcms-js-sdk.js"></script>
```

#### Browser(CDN)

Please load and use the URL provided by an external provider.

```html
<script src="https://unpkg.com/microcms-js-sdk@3.1.0/dist/umd/microcms-js-sdk.js"></script>
Expand All @@ -32,6 +44,9 @@ or
<script src="https://unpkg.com/microcms-js-sdk@latest/dist/umd/microcms-js-sdk.js"></script>
```

> [!WARNING]
> The hosting service (unpkg.com) is not related to microCMS. For production use, we recommend self-hosting on your own server.
### How to use

First, create a client.
Expand Down

0 comments on commit 0513171

Please sign in to comment.