2022-02-11 23:04:51 +08:00
# Quick Start
## Fork
You can use this template on GitHub without downloading it locally.
2023-01-13 21:57:01 +08:00
Visit the [**importantimport/urara** ](https://github.com/importantimport/urara ) repository and click the GitHub, Vercel, or Netlify deploy button below.
2022-02-11 23:04:51 +08:00
## Local Downloads
### Node.js
You must check that Node.js is installed on your computer before downloading.
```bash
node --version
```
2023-01-13 21:57:01 +08:00
If your computer does not have Node.js installed, you will need to [**download and complete the installation** ](https://nodejs.org/zh-tw/download ).
2022-02-11 23:04:51 +08:00
> For Windows users: make sure the **Add to PATH** option is checked (checked by default)
### pnpm
2023-01-13 21:57:01 +08:00
This item uses the [**pnpm** ](https://pnpm.io/zh ) package manager by default.
2022-02-11 23:04:51 +08:00
2022-12-23 01:28:33 +08:00
Installed via npm.
2022-02-11 23:04:51 +08:00
```bash
2022-12-27 01:50:01 +08:00
npm i -g pnpm
2022-02-11 23:04:51 +08:00
```
2023-01-13 21:57:01 +08:00
For other installation methods, please refer to the [**official documentation** ](https://pnpm.io/zh/installation ).
2022-02-11 23:04:51 +08:00
### degit
2022-04-13 15:09:49 +08:00
Use `degit` to download the template and install the dependency packages:
2022-02-11 23:04:51 +08:00
```bash
2022-04-13 15:09:49 +08:00
pnpm dlx degit importantimport/urara # Download to the current directory
2022-02-11 23:04:51 +08:00
# or
2022-04-13 15:09:49 +08:00
pnpm dlx degit importantimport/urara my-blog & & cd my-blog # Create a new my-blog in the current directory and download it to that folder, then go to
2022-02-11 23:04:51 +08:00
2022-04-13 15:09:49 +08:00
pnpm i # Install the dependency package
2022-02-11 23:04:51 +08:00
```
## Run
### Development
2022-04-13 15:09:49 +08:00
Use `pnpm dev` to run the development server.
2022-02-11 23:04:51 +08:00
```bash
2022-04-13 15:09:49 +08:00
pnpm dev # http://localhost:3000
pnpm dev -- --host 0.0.0.0 # http://0.0.0.0:3000
pnpm dev -- --host 0.0.0.0 --port 8080 # http://0.0.0.0:8080
2022-02-11 23:04:51 +08:00
```
### Deployment
This template uses `adapter-auto` by default and automatically falls back to `adapter-static` when no compatible environment is detected.
2022-04-13 15:09:49 +08:00
Use `pnpm build` to generate the deployment file.
2022-02-11 23:04:51 +08:00
```bash
2022-04-13 15:09:49 +08:00
pnpm build
2022-02-11 23:04:51 +08:00
```
or to force the use of a specific adapter.
```bash
2022-04-13 15:09:49 +08:00
VERCEL=true pnpm build # adapter-vercel
2022-02-11 23:04:51 +08:00
CF_PAGES=true # adapter-cloudflare-pages
2022-04-13 15:09:49 +08:00
NETLIFY=true pnpm build # adapter-netlify
2022-02-11 23:04:51 +08:00
```