Skip to content

Commit

Permalink
fix: write id.json to local file on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
raghav-rama committed Nov 29, 2024
1 parent 71c2c46 commit 4c1674f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .ebextensions/01_commands.config

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
node_modules
.envrc
.envrc
id.json
5 changes: 4 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import 'dotenv/config';
import bs58 from 'bs58';
import { Keypair, PublicKey } from '@solana/web3.js';
import fs from 'fs';

class Config {
private static instance: Config | null = null;

private constructor() {}
private constructor() {
fs.writeFileSync('id.json', process.env.ADMIN_KEYPAIR!);
}

public static getInstance(): Config {
if (!Config.instance) {
Expand Down

0 comments on commit 4c1674f

Please sign in to comment.