INNER CODE UNIT · TypeScript

scaffoldBaseFiles

prisma-labs/graphql-framework-experiment · src/cli/commands/create/app.ts:463

async function scaffoldBaseFiles(options: InternalConfig) {
  const appEntrypointPath = Path.join(options.sourceRoot, 'app.ts')
  const sourceRootRelative = Path.relative(options.projectRoot, options.sourceRoot)

  await Promise.all([
    // Empty app and graphql module.
    // Having at least one of these satisfies minimum Nexus requirements.
    // We put both to setup vscode debugger config with an entrypoint that is
    // unlikely to change.
    fs.writeAsync(
      appEntrypointPath,
      stripIndent`
      /**
       * This file is your server entrypoint. Don't worry about its emptyness, Nexus handles everything for you.
       * However, if you need to add settings, enable plugins, schema middleware etc, this is place to do it.
       * Below are some examples of what you can do. Uncomment them to try them out!
       */

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…