Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hello, I have deployed an app using Digitalocean APP but every POST request is failing 405 Method not allowed while it’s working in local.
as per Nuxt 3 documentation, I have setup environment Variable as NITRO_PRESET=digital-ocean and similar.
/server/api/aut/login.post.ts
export default defineEventHandler(async (event) => {
const body = await readBody<{ email: string; password: string; rememberMe: boolean }>(event)
const config = useRuntimeConfig()
const {
email,
password,
rememberMe
} = body
const data = await $fetch(process.env.API_BASE_URL + "/api/token/", {
method: "POST",
body: body
})
if (data) {
setCookie(event, 'access', data.access, {
httpOnly: true,
path: '/',
sameSite: 'strict',
secure: process.env.NODE_ENV === 'production',
expires: rememberMe ? new Date(Date.now() + config.cookieRememberMeExpires) : new Date(Date.now() + config.cookieAccessExpires),
})
setCookie(event, 'refresh', data.refresh, {
httpOnly: true,
path: '/',
sameSite: 'strict',
secure: process.env.NODE_ENV === 'production',
expires: rememberMe ? new Date(Date.now() + config.cookieRememberMeExpires) : new Date(Date.now() + config.cookieRefreshExpires),
})
}
return data
})
dolphinnn
Vaishnavi Vundyala
016512ea60864da0867e5280f293de
Peter Monadjemi
Prince7hakur
devjk1
fc9acbfbc3124cbf8df28a1c5c5cdb
ab871885551143798f41908c709271
gouskova
Saivion Services
Marin
182d09356ab94d3893ddfaca4f0270