Skip to content

Commit

Permalink
Merge pull request #386 from boostcampwm2023/server/feature/383
Browse files Browse the repository at this point in the history
Refresh Token 추가 & Redis 연결
  • Loading branch information
sk000801 authored Jan 29, 2024
2 parents 73da6e6 + f6d7506 commit bba6d14
Show file tree
Hide file tree
Showing 13 changed files with 397 additions and 29 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/server-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ jobs:
echo "CLOUD_FUNCTIONS_EXECUTE_URL=$CLOUD_FUNCTIONS_EXECUTE_URL" >> prod.env
echo "CLOUD_FUNCTIONS_REQUEST_URL=$CLOUD_FUNCTIONS_REQUEST_URL" >> prod.env
echo "API_GW_ACCESS_KEY=$API_GW_ACCESS_KEY" >> prod.env
echo "REFRESH_SECRET_KEY=$REFRESH_SECRET_KEY" >> prod.env
echo "REDIS_HOST_IP=$REDIS_HOST_IP" >> prod.env
echo "REDIS_PASSWORD=$REDIS_PASSWORD" >> prod.env
echo "REDIS_PORT=$REDIS_PORT" >> prod.env
echo "REDIS_TTL=$REDIS_TTL" >> prod.env
- name: Build Docker image
run: docker build --platform linux/amd64 ./server -t ${{ secrets.NCP_REGISTRY }}/catchy-tape:latest
Expand Down
238 changes: 238 additions & 0 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"dependencies": {
"@ffmpeg-installer/ffmpeg": "^1.1.0",
"@nestjs/axios": "^3.0.1",
"@nestjs/cache-manager": "^2.2.0",
"@nestjs/common": "^10.0.0",
"@nestjs/config": "^3.1.1",
"@nestjs/core": "^10.0.0",
Expand All @@ -32,6 +33,8 @@
"@types/multer": "^1.4.10",
"aws-sdk": "^2.1496.0",
"axios": "^1.6.2",
"cache-manager": "^4.1.0",
"cache-manager-redis-store": "^2.0.0",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"cross-env": "^7.0.3",
Expand All @@ -53,6 +56,8 @@
"@nestjs/cli": "^10.0.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
"@types/cache-manager": "^4.0.6",
"@types/cache-manager-redis-store": "^2.0.4",
"@types/crypto-js": "^4.2.1",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.2",
Expand Down
10 changes: 9 additions & 1 deletion server/src/auth/auth.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { Music } from 'src/entity/music.entity';
import { Music_Playlist } from 'src/entity/music_playlist.entity';
import { Logger } from '@nestjs/common';
import { PassportModule } from '@nestjs/passport';
import { CacheModule } from '@nestjs/cache-manager';
import { ConfigModule, ConfigService } from '@nestjs/config';

describe('AuthController', () => {
let controller: AuthController;
Expand All @@ -20,11 +22,17 @@ describe('AuthController', () => {

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
imports: [PassportModule.register({ defaultStrategy: 'jwt' }), JwtModule],
imports: [
PassportModule.register({ defaultStrategy: 'jwt' }),
JwtModule,
CacheModule.register({}),
ConfigModule,
],
controllers: [AuthController],
providers: [
Logger,
AuthService,
ConfigService,
{
provide: getRepositoryToken(User),
useClass: Repository,
Expand Down
Loading

0 comments on commit bba6d14

Please sign in to comment.