# realworld-nuxt **Repository Path**: pickle_code/realworld-nuxt ## Basic Information - **Project Name**: realworld-nuxt - **Description**: 使用 nuxt 做一个同构项目~~ - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-17 - **Last Updated**: 2021-08-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # nuxt-realworld #### 项目初始化 ``` // 1. 初始化一个 package.json 文件 npm init -y // 2. 安装 nuxt npm i nuxt // 3.将 package.json 里的 scripts 修改为 "scripts": { "dev": "nuxt" } ``` #### 页面模板和接口地址 `http://realworld.api.fed.lagounews.com` #### nuxt 路由配置 ```js // 来自官方文档 export default { router: { extendRoutes(routes, resolve) { // 清除默认生成的配置 routes.splice(0) // 制定路由规则 routes.push({ name: 'custom', path: '*', component: resolve(__dirname, 'pages/404.vue') }) } } } ```