Skip to content

Commit

Permalink
feat: Add example env files and scripts to set up the development env…
Browse files Browse the repository at this point in the history
…ironment
  • Loading branch information
alllenshibu committed Jun 26, 2024
1 parent c95e8df commit 19da5d5
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 2 deletions.
8 changes: 8 additions & 0 deletions apps/core-admin/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PORT=3001

AUTH0_DOMAIN=dev-techno.jp.auth0.com
AUTH0_ISSUER_BASE_URL=https://dev-techno.jp.auth0.com
AUTH0_AUDIENCE=https://core.techno.iedcmec.in/api

DATABASE_URL="postgres://postgres.qdydcjeonvpvifdfcntz:[email protected]:5432/postgres"

1 change: 1 addition & 0 deletions apps/core-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "npm run clean & webpack --config webpack.config.js",
"clean": "rimraf dist & rimraf build",
"dev": "concurrently \"npx tsc --watch\" \"nodemon -q build/index.js\"",
"setup": "node -e \"require('fs').rename('.env.example','.env',function(err){if(err){console.log(err);}console.log('Environment variables set up successfully');});\"",
"start": "node dist/app.js",
"test": "mocha -r ts-node/register 'tests/**/*.ts' --timeout 10000 --exit",
"lint": "eslint --ext .ts src"
Expand Down
4 changes: 4 additions & 0 deletions apps/core-auth0-actions/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PORT=3002
AUTHORIZATION_SECRET=quNPgB8EzWxwlgL4ZdMTHa0g13VXwAAAAMBAAEAAAGAYLKEfPehr8m2luzOL63AUi3u6j
DATABASE_URL="postgres://postgres.qdydcjeonvpvifdfcntz:[email protected]:5432/postgres"

1 change: 1 addition & 0 deletions apps/core-auth0-actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "npm run clean & webpack --config webpack.config.js",
"clean": "rimraf dist & rimraf build",
"dev": "concurrently \"npx tsc --watch\" \"nodemon -q build/index.js\"",
"setup": "node -e \"require('fs').rename('.env.example','.env',function(err){if(err){console.log(err);}console.log('Environment variables set up successfully');});\"",
"start": "node dist/app.js",
"lint": "eslint --ext .ts src"
},
Expand Down
15 changes: 15 additions & 0 deletions apps/web-admin/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
NEXT_PUBLIC_API_URL=http://localhost:3001

AUTH0_SECRET=some-very-very-very-very-very-very-very-long-secret
AUTH0_BASE_URL=http://localhost:3000
AUTH0_ISSUER_BASE_URL=https://dev-techno.jp.auth0.com
AUTH0_CLIENT_ID=ttzoKwsedelzch4v14jttzXTaDmGuMQH
AUTH0_CLIENT_SECRET=xzHPry2hGXWldGP2UltJBDEewqauSiH7xIBn3XVaG2xyAHD_Q3KoetKZN7bJWiVS


NEXT_PUBLIC_AUTH0_DOMAIN=dev-techno.jp.auth0.com
NEXT_PUBLIC_AUTH0_CLIENT_ID=ttzoKwsedelzch4v14jttzXTaDmGuMQH
NEXT_PUBLIC_AUTH0_AUDIENCE=https://core.techno.iedcmec.in/api
NEXT_PUBLIC_AUTH0_REDIRECT_URI=http://localhost:3000
AUTH0_AUDIENCE=https://core.techno.iedcmec.in/api

1 change: 1 addition & 0 deletions apps/web-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"setup": "node -e \"require('fs').rename('.env.example','.env',function(err){if(err){console.log(err);}console.log('Environment variables set up successfully');});\"",
"lint": "next lint"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"lint": "turbo run lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"test": "turbo run test",
"prepare": "husky install"
"prepare": "husky install",
"setup": "turbo run setup"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
Expand Down
1 change: 1 addition & 0 deletions packages/database/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DATABASE_URL="postgres://postgres.qdydcjeonvpvifdfcntz:[email protected]:5432/postgres"
3 changes: 2 additions & 1 deletion packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"types": "./index.d.ts",
"scripts": {
"db:generate": "prisma generate",
"db:push": "prisma db push --skip-generate"
"db:push": "prisma db push --skip-generate",
"setup": "node -e \"require('fs').rename('.env.example','.env',function(err){if(err){console.log(err);}console.log('Environment variables set up successfully');});\""
},
"dependencies": {
"@prisma/client": "^5.7.1"
Expand Down
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"cache": false,
"persistent": true
},
"setup": {},
"test": {
"dependsOn": ["^build"],
"inputs": ["src/**/*.tsx", "src/**/*.ts", "test/**/*.ts", "test/**/*.tsx"]
Expand Down

0 comments on commit 19da5d5

Please sign in to comment.