feature: Add configs
This commit is contained in:
parent
4291fa832a
commit
28e115c6cb
6
src/bootstrap/configs/common-configs.ts
Normal file
6
src/bootstrap/configs/common-configs.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
const commonConfigs = {
|
||||||
|
appName: process.env.APP_NAME ?? "NEXT_BOILERPLATE",
|
||||||
|
toastTimeout: 3000,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default commonConfigs;
|
26
src/bootstrap/configs/route-configs.ts
Normal file
26
src/bootstrap/configs/route-configs.ts
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import HomeIcon from "@/app/components/icons/home";
|
||||||
|
import langKey from "@/bootstrap/i18n/dictionaries/lang-key";
|
||||||
|
import { DocumentIcon } from "@heroicons/react/24/outline";
|
||||||
|
|
||||||
|
type RouteItem = {
|
||||||
|
langKey: string;
|
||||||
|
icon?:
|
||||||
|
| ((props: { className?: string } & Record<string, unknown>) => JSX.Element)
|
||||||
|
| typeof DocumentIcon;
|
||||||
|
path: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
const routeConfig: Record<string, RouteItem> = {
|
||||||
|
home: {
|
||||||
|
langKey: langKey.global.home,
|
||||||
|
path: "/",
|
||||||
|
icon: HomeIcon,
|
||||||
|
},
|
||||||
|
dashboard: {
|
||||||
|
langKey: langKey.global.dashboard,
|
||||||
|
path: "/dashboard",
|
||||||
|
icon: DocumentIcon,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default routeConfig;
|
18
src/bootstrap/configs/server-configs.ts
Normal file
18
src/bootstrap/configs/server-configs.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import "server-only";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* You can put all configs which shouldn't be mapped to the client side.
|
||||||
|
*/
|
||||||
|
const serverConfigs = {
|
||||||
|
env: {
|
||||||
|
backendApi: {
|
||||||
|
url: process.env.BACKEND_BASE_HOST as string,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
cookies: {
|
||||||
|
authToken: "auth-token",
|
||||||
|
authProfile: "auth-profile",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default serverConfigs;
|
Loading…
x
Reference in New Issue
Block a user