fix,docs: README.md update, api 수정
This commit is contained in:
1
frontend/admin/.env.local.sample
Normal file
1
frontend/admin/.env.local.sample
Normal file
@@ -0,0 +1 @@
|
||||
PORT=3001
|
||||
@@ -1,8 +1,6 @@
|
||||
# Frontend Admin Boilerplate
|
||||
# Frontend Admin
|
||||
|
||||
Next.js + typescript + material ui 활용한 admin dashboard Boilerplate.
|
||||
|
||||
[notion link](https://www.notion.so/Nextjs-MUI-Admin-template-bc57d86c94724bbf83601883c2d5ec13)
|
||||
Next.js + typescript + material ui 활용한 admin dashboard.
|
||||
|
||||
## Getting Started
|
||||
|
||||
@@ -11,11 +9,21 @@ First, run the development server:
|
||||
```bash
|
||||
npm install
|
||||
npm run dev
|
||||
# or
|
||||
yarn
|
||||
yarn dev
|
||||
```
|
||||
|
||||
run the local to production mode:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run build
|
||||
npm run start
|
||||
```
|
||||
|
||||
### 환경변수
|
||||
|
||||
- `.env.local.sample` 파일처럼 `.env.local` 파일을 생성하여 필요한 환경변수를 세팅한다.
|
||||
- 사용하고 있는 환경변수는 `./src/constants/env.ts`, `./next.config.js` 파일을 확인한다.
|
||||
|
||||
## 폴더 구조
|
||||
|
||||
```bash
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"clean:dev": "rimraf .next",
|
||||
"build:server": "tsc --project tsconfig.server.json",
|
||||
"build:next": "next build",
|
||||
"prebuild": "rimraf ./dist",
|
||||
"prebuild": "rimraf ./dist .next",
|
||||
"build": "npm run build:next && npm run build:server",
|
||||
"build:prodlg": "env-cmd -f ./.env.production-lg npm run build:next && npm run build:server",
|
||||
"start:prodlg": "env-cmd -f ./.env.production-lg node dist/index.js",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios, { AxiosError } from 'axios'
|
||||
import { Page, Pageable, Sort } from '@utils'
|
||||
import axios, { AxiosError } from 'axios'
|
||||
import { common } from './common'
|
||||
|
||||
export interface CommentPage {
|
||||
@@ -102,7 +102,7 @@ export const commentService = {
|
||||
all: (boardNo: number, postsNo: number) =>
|
||||
new Promise<Page>((resolve, rejects) => {
|
||||
try {
|
||||
axios.get(`${COMMENT_URL}/${boardNo}/${postsNo}/all`).then(result => {
|
||||
axios.get(`${COMMENT_URL}/total/${boardNo}/${postsNo}`).then(result => {
|
||||
resolve(result.data)
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user