INNER CODE UNIT · TypeScript

generateKeys

ghoshnirmalya/nextjs-hasura-boilerplate · scripts/generate-keys.ts:5

async function generateKeys() {
  try {
    // Get the contents of the .env.example file
    const frontendEnvironmentVariables = fs.readFileSync(
      "frontend/.env.example",
      "utf8"
    );

    console.log(
      `Create a Google OAuth Client from https://console.developers.google.com/apis/credentials/oauthclient and copy the credentials to GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET in your .env file inside the frontend directory\n`
    );

    // Generate the private.pem file
    await exec("openssl genrsa -out private.pem 2048");

    // Generate the public.pem file
    await exec("openssl rsa -in private.pem -pubout > public.pem");

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…