@saulx/aristotle-create-server-dist
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

serve

// dev server
import serve from '@saulx/aristotle-serve'

serve({
  port: 8080,
  build: {
    entryPoints: ['index.tsx'],
    sourcemap: true,
    watch: true,
    loader: { '.js': 'jsx' },
    define: {
      'process.env.NODE_ENV': '"dev"'
    }
  }
})
// production server
import serve from '@saulx/aristotle-serve'

serve({
  port: 8080,
  build: 'build.json' // build.json is default
})
// generic server could be
import serve from '@saulx/aristotle-serve'

serve({
  port: 8080,
  build:
    process.env.NODE_ENV === 'production'
      ? 'build.json'
      : {
          entryPoints: ['index.tsx'],
          sourcemap: true,
          watch: true,
          loader: { '.js': 'jsx' },
          define: {
            'process.env.NODE_ENV': '"dev"'
          }
        }
})

Readme

Keywords

none

Package Sidebar

Install

npm i @saulx/aristotle-create-server-dist

Weekly Downloads

1

Version

2.2.0

License

none

Unpacked Size

11.9 kB

Total Files

6

Last publish

Collaborators

  • saulx