web-app-repo: https://github.com/iboughtbed/nasa-2024
web-app-link: https://nasa-2024-ai.vercel.app
mobile-app-repo: https://github.com/adst0rm/exosky-app.git
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
# Base image with Bun | |
FROM oven/bun:1.2.23 AS base | |
# Install turbo CLI | |
FROM base AS turbo-cli | |
RUN bun install -g turbo@2.5.9-canary.4 | |
# Builder stage | |
FROM turbo-cli AS builder |
I recommend reading the Next.js documentation thoroughly, from start to finish:
When I say "read it," I mean really read it—understand what's best for optimizing application performance.
Blog posts you should definitely read - https://nextjs.org/blog/security-nextjs-server-components-actions. You will understand how to keep your application secure in the new app router.
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
"use server"; | |
// this creates an endpoint that can be called by client-side | |
// it creates POST REQUEST ENDPOINT | |
export async function deleteUser(userId: string) { | |
console.log("deleting user: ", userId); | |
// problem: anyone can delete any user now | |
// why: server action becomes an endpoint, which can be accessed by anyone |