expressStarts method

Future<void> expressStarts (
  1. {String path,
  2. String projectName}
)

Implementation

Future<void> expressStarts({String path, String projectName}) async {
  ANSIPrinter().printRGB(
      '-------------------------------------------------------------------------------------------',
      breakLine: true,
      bGray: 1.0,
      fColor: 0xff4BB543);
  print('Express creating.....');
  File('$path\\node_start.sh')
      .writeAsStringSync('#!/bin/bash\ncd $path\nnpm init');

  await Process.run('$path\\node_start.sh', [], runInShell: true);
  ANSIPrinter().printRGB('Created package.json',
      breakLine: true, bGray: 1.0, fColor: 0xff4BB543);

  ANSIPrinter().printRGB(
      '-------------------------------------------------------------------------------------------',
      breakLine: true,
      bGray: 1.0,
      fColor: 0xff4BB543);

  ANSIPrinter().printRGB('Now call expressInstallDependencies("path") ',
      breakLine: true, bGray: 1.0, fColor: 0xff4BB543);
  ANSIPrinter().printRGB(
      '-------------------------------------------------------------------------------------------',
      breakLine: true,
      bGray: 1.0,
      fColor: 0xff4BB543);

  // await shell.pushd(path).runExecutableArguments('npm', [
  //   'init'
  // ]);
//\nnpm install express nodemon \nnpm install bcrypt \nnpm install dotenv \nnpm install jsonwebtoken \nnpm install mongoose \nnpm install node-input-validator
  //  shell = shell.popd();
}