dockerize, composte, and various improvements

This commit is contained in:
Zoe
2023-06-05 01:44:12 -05:00
parent cb6bfd8880
commit 99c385d211
56 changed files with 5907 additions and 8091 deletions

View File

@@ -1,5 +1,4 @@
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
import prisma from '~/server/utils/prisma';
export default defineEventHandler(async (event) => {
const cookies = parseCookies(event);

View File

@@ -1,5 +1,4 @@
import Redis from 'ioredis';
const redis = new Redis();
import redis from '~/server/utils/redis';
const INCREMENT_LIMIT = 5;
const LIMIT_TIME = 700; // milliseconds

View File

@@ -1,8 +1,6 @@
import { Server } from 'socket.io';
import { PrismaClient } from '@prisma/client';
import { IChannel, IServer, IUser, SafeUser } from '~~/types';
import { Socket } from 'socket.io';
const prisma = new PrismaClient();
import { Server, Socket } from 'socket.io';
import { IChannel, IServer, IUser, SafeUser } from '~/types';
import prisma from '~/server/utils/prisma';
export default defineEventHandler(({ node }) => {
if (global.io) return;