vit-serve
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Vit-serve

Vit-serve is global server to run with node. It's build with Express, Appolo Server and TypeOrm.

Install it Define where to find your :

  • *.action.ts files (to serve misc. content)
  • *.graphql + *.resolver.ts (to activate and provide GraphQL api)
  • single datasource config based on TypeOrm
const gs = new GlobalServer(
   {
       webConfig: {
           pathActionGlob:  process.cwd() + '/set/*.action.ts',
       },
       graphQlConfig: {
           urlApi: '/api',
           pathGraphqlGlob: process.cwd() + '/set/*.graphql',
           pathResolverGlob: process.cwd() + '/set/*.resolver.ts',
       },
       datasource: {
           type: "sqlite",
           database: process.cwd() + '/db.sqlite',
           entities: [process.cwd() + '/set/entity/*.ts'],
           logging: false,
           synchronize: true
       }
   }
)
gs.run().then((status) => console.log(status))

Package Sidebar

Install

npm i vit-serve

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

13.3 MB

Total Files

8

Last publish

Collaborators

  • vitse