- Чувствительные данные храни в .env файле, не допускай утечек на клиентской стороне.
- Инициализацию нового проекта на next.js всегда начинай с команды
npx create-next-app@latest . --yesвместо генерации с нуля.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # syntax=docker/dockerfile:1 | |
| # Comments are provided throughout this file to help you get started. | |
| # If you need more help, visit the Dockerfile reference guide at | |
| # https://docs.docker.com/engine/reference/builder/ | |
| ARG DATABASE_URL | |
| ################################################################################ | |
| # Use node image for base image for all stages. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type {FastifyPluginAsync} from "fastify"; | |
| import fastifyPlugin from "fastify-plugin"; | |
| import cookie from "@fastify/cookie"; | |
| import session from "@fastify/session" | |
| declare module 'fastify' { | |
| interface Session { | |
| user_id: string | |
| } |