@atria/server
v0.0.36
Published
Server package
Downloads
4,100
Readme
@atria/server
HTTP runtime server used by atria dev.
Install
npm install @atria/serverUsage
import { startDevServer } from "@atria/server";
const server = await startDevServer({
projectRoot: process.cwd(),
adminPort: 3333,
publicPort: 4444
});
console.log(server.publicUrl); // http://localhost:4444
console.log(server.adminUrl); // http://localhost:3333Port routing
localhost:3333-> serves Studio runtime.localhost:4444-> servesproduction/public.
Admin asset routing
GET /static/*serves assets from@atria/admin/dist.- Legacy prefixes are kept for compatibility.
Health and setup routes
GET /api/healthGET /api/setup/status
Health payload includes:
ok,status,sitepublicOutputPublishedownerSetupPendingdatabase(driver,source,usesFallback,reachable,error)
Auth routes
GET /api/auth/providersGET /api/auth/sessionPOST /api/auth/logoutPOST /api/auth/email/registerPOST /api/auth/email/loginGET /api/auth/start/:providerGET /api/auth/callback/:providerGET /api/auth/broker/exchange
Auth redirect behavior
- When owner setup is pending, protected Studio routes redirect to
/create. - After owner exists,
/createredirects to/(login flow). - Unauthenticated access to protected Studio routes redirects to
/withnextquery.
