Skip to content

argon1025/TILog-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

현재 이곳에서 TILog-v2 마이그레이션이 진행중입니다.

Logo

TILog server

blog platform for developers, TILog.
Frontend project is at another Repo
개발자를 위한 블로그 플랫폼 TILog 입니다.

View Service · Report Bug · Request Feature

Project Status

Last Release Build : CircleCI image

Team

image

image

image

  • 게시글 태그
  • 태그 검색

Built With

  • NestJS
  • TypeScript
  • MySQL
  • typeORM
  • Redis

ERD Diagram

erd

Getting Started

1. Clone this Project

git clone https://github.com/argon1025/TILog-server.git

2. Move Project folder and Install npm module

cd TILog-server
npm install

3. Create environment file

// vi .env
// vi .end.dev

# Server Settings
SERVER_PORT=3000
SERVER_HOST=localhost

# CORS Settings
CORS_METHOD=GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS
CORS_ORIGIN=true
CORS_CREDENTIALS=true

# Database Settings
DB_PASSWORD=
DB_DATABASE=TILog
DB_USERNAME=TILog
DB_HOST=
DB_PORT=3306

# Redis storage Settings
REDIS_HOST=redis://localhost
REDIS_PORT=6379

# Passport Settings
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_CALLBACK_URL=

# Session Settings
SESSION_SECRET=
SESSION_RESAVE=
SESSION_SAVEUNINITIALIZED=
## 24H
SESSION_COOKIE_MAXAGE=86400000

# Front Server Setting
REDIRECT_FRONT=http://localhost:8080/login

# S3 fileUpload settings
AWS_S3_BUCKET=
AWS_S3_ACCESS_KEY=
AWS_S3_KEY_SECRET=
MAXIMUM_IMAGE_FILE_SIZE_BYTES=10000000

# Post cursor Settings
POSTS_GET_CONTENT_LIMIT=30

# Throttle Settings
THROTTLE_TTL=60
THROTTLE_LIMIT=10

# Alert WebHook
ERROR_SLACK_WEBHOOK_URL=https://hooks.slack.com/

# Sentry
SENTRY_DNS=https://uhvb123312398798asd89y8yh@o1171978.ingest.sentry.io

4.Using Docker-compose to Run the Storage.

docker-compose up --build

Please Change the environment variable(Database password) in docker-compose.yml

5.Start serverApp

cd src
npm run start:dev

Please Change the environment variable(.env.dev)