#!/bin/node

const fs = require('fs') //Obtain the environment string passed to the node script

const environment = process.argv[2] 
const envFileContent = require(`./config/${environment}.json`) //read the content of the json file

console.log(__dirname)

 //copy the json inside the env.json file
fs.writeFileSync(`${__dirname}/public/config.json`, JSON.stringify(envFileContent, undefined, 2))
