fix,docs: README.md update, api 수정

This commit is contained in:
shinmj
2021-12-31 10:18:38 +09:00
parent 32bf74c43f
commit 866eb35d4a
6 changed files with 67 additions and 23 deletions

View File

@@ -0,0 +1 @@
PORT=3001

View File

@@ -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

View File

@@ -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",

View File

@@ -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) {