Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

blog platform for developers, TILog

Notifications You must be signed in to change notification settings

TIL-Log-lab/Tilog-server-node-v1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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://[email protected]

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)