docs: update

This commit is contained in:
Takeshi Kimata
2024-07-29 22:01:06 +09:00
parent 1b61567ae7
commit 0da8e4129e
11 changed files with 110 additions and 73 deletions

View File

@@ -1,43 +0,0 @@
# unittcms Backend
## Install dependencies
```bash
npm install
```
## Set Environmental variable
Create `.env` File
```
FRONTEND_ORIGIN=http://localhost:8000
PORT=8001
SECRET_KEY=your-secret-key
```
## Set up database
```bash
npm run migrate
```
## Run the development server
```bash
node --env-file=.env index.js
```
## Database operation command
### drop table
```bash
npm run drop
```
### add seed data
```bash
npm run seed
```

View File

@@ -3,7 +3,8 @@
"version": "1.0.0",
"private": true,
"scripts": {
"start": "node index",
"start": "node --env-file=.env index",
"dev": "node index",
"migrate": "bash scripts/migrate.sh",
"seed": "bash scripts/seed.sh",
"drop": "bash scripts/drop.sh"