"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([["5718"],{1505:function(e,s,n){n.r(s),n.d(s,{default:()=>h,frontMatter:()=>c,metadata:()=>r,assets:()=>d,toc:()=>a,contentTitle:()=>o});var r=JSON.parse('{"id":"advanced/services","title":"Services","description":"LiveCodes (being a client-side app) uses multiple services (for example for authentication, sharing, module resolution, etc).","source":"@site/docs/advanced/services.mdx","sourceDirName":"advanced","slug":"/advanced/services","permalink":"/docs/advanced/services","draft":false,"unlisted":false,"editUrl":"https://github.com/live-codes/livecodes/tree/develop/docs/docs/advanced/services.mdx","tags":[],"version":"current","frontMatter":{},"sidebar":"docsSidebar","previous":{"title":"Custom Settings","permalink":"/docs/advanced/custom-settings"},"next":{"title":"Languages","permalink":"/docs/languages/"}}'),t=n("5893"),i=n("65");let c={},o="Services",d={},a=[];function l(e){let s={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"services",children:"Services"})}),"\n",(0,t.jsx)(s.p,{children:"LiveCodes (being a client-side app) uses multiple services (for example for authentication, sharing, module resolution, etc)."}),"\n",(0,t.jsxs)(s.p,{children:["These services are ",(0,t.jsx)(s.a,{href:"https://github.com/live-codes/livecodes/tree/develop/src/livecodes/services",children:"defined here"}),"."]}),"\n",(0,t.jsxs)(s.p,{children:["Some of the services are not supported on ",(0,t.jsx)(s.a,{href:"/docs/features/self-hosting",children:"self-hosted"})," deploys and are either replaced by other compatible services or require you to provide an alternative service."]}),"\n",(0,t.jsx)(s.p,{children:"Examples:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["The ",(0,t.jsx)(s.a,{href:"/docs/features/share",children:"share"})," service in ",(0,t.jsx)(s.a,{href:"/docs/features/self-hosting",children:"self-hosted"})," apps uses ",(0,t.jsx)(s.a,{href:"https://dpaste.com/",children:"dpaste"})," for short URLs, which are ",(0,t.jsx)(s.a,{href:"https://dpaste.com/help",children:(0,t.jsx)(s.strong,{children:"deleted after 365 days"})}),"."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"https://github.com/live-codes/livecodes/tree/develop/src/livecodes/services/firebase.ts",children:"Firebase configuration"})," for authentication."]}),"\n"]}),"\n",(0,t.jsx)(s.admonition,{type:"info",children:(0,t.jsxs)(s.p,{children:["LiveCodes ",(0,t.jsx)(s.a,{href:"/docs/sponsor",children:"sponsors"})," (Bronze sponsors and above) get access to managed custom services."]})}),"\n",(0,t.jsxs)(s.p,{children:["If you ",(0,t.jsx)(s.a,{href:"/docs/features/self-hosting",children:"self-host"})," your app and need to change any of these services, start by following the ",(0,t.jsx)(s.a,{href:"/docs/features/self-hosting",children:"guide described there"}),"."]}),"\n",(0,t.jsxs)(s.p,{children:["Then, edit the services you want (in ",(0,t.jsx)(s.a,{href:"https://github.com/live-codes/livecodes/tree/develop/src/livecodes/services",children:(0,t.jsx)(s.code,{children:"src/livecodes/services"})}),"). The used services need to have the same interface."]}),"\n",(0,t.jsx)(s.p,{children:"The app then needs to be re-built using the command:"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-shell",children:"npm run build\n"})}),"\n",(0,t.jsxs)(s.p,{children:["The built app is in ",(0,t.jsx)(s.code,{children:"build"})," directory. This can be hosted on any static file server."]})]})}function h(e={}){let{wrapper:s}={...(0,i.a)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},65:function(e,s,n){n.d(s,{Z:function(){return o},a:function(){return c}});var r=n(7294);let t={},i=r.createContext(t);function c(e){let s=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),r.createElement(i.Provider,{value:s},e.children)}}}]);