diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fd50e1b..1a0e98f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,14 +9,16 @@ Then this is the perfect place for you! ## Setting Up Locally + - Create a `.env.local` file or use `npm run pull` if you're part of our team. ```properties # .env.local NEXTAUTH_SECRET="local-secret" -NEXTAUTH_URL="http://localhost:8000" +NEXTAUTH_URL="http://localhost:3000" DISCORD_CLIENT_ID="" DISCORD_CLIENT_SECRET="" +DATABASE_URL="" ``` - Install the Node Modules @@ -27,7 +29,7 @@ $ npm ci ## Start the Server~ -The app should startup at http://localhost:8000! +The app should startup at http://localhost:3000! ```sh $ npm start diff --git a/next.config.mjs b/next.config.mjs index 1962c73..d687ebc 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,4 +1,12 @@ // @ts-check +import fs from 'fs'; +import dotenvJSON from 'dotenv-json'; +const dotenvFile = '.env.json'; +if (fs.existsSync(dotenvFile)) { + dotenvJSON({ + path: dotenvFile + }); +} /** * @type {import('next').NextConfig} diff --git a/package-lock.json b/package-lock.json index 519820f..55fdfba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@prisma/client": "^4.4.0", "@reduxjs/toolkit": "^1.9.0", "classnames": "^2.3.2", + "dotenv-json": "^1.0.0", "mobile-detect": "^1.4.5", "next": "^13.0.3", "next-auth": "^4.16.4", @@ -38,6 +39,7 @@ "@typescript-eslint/eslint-plugin": "^5.42.1", "@typescript-eslint/parser": "^5.42.1", "chance": "^1.1.9", + "convert-json-env": "^1.1.2", "eslint": "^8.27.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-react": "^7.31.10", @@ -3292,6 +3294,18 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/convert-json-env": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/convert-json-env/-/convert-json-env-1.1.2.tgz", + "integrity": "sha512-lQSybvijksD5nG5XCX3WnUplo7qF1B3d4Iq0UoS76lC1OPLO3p5/nX5Im5/R6zewTGDPK6p7pvKBnAu2YjySxA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "convert-json-env": "index.js" + } + }, "node_modules/convert-source-map": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", @@ -3479,6 +3493,11 @@ "integrity": "sha512-NMt+m9zFMPZe0JcY9gN224Qvk6qLIdqex29clBvc/y75ZBX9YA9wNK3frsYvu2DI1xcCIwxwnX+TlsJ2DSOADg==", "dev": true }, + "node_modules/dotenv-json": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dotenv-json/-/dotenv-json-1.0.0.tgz", + "integrity": "sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ==" + }, "node_modules/electron-to-chromium": { "version": "1.4.270", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.270.tgz", @@ -7464,6 +7483,15 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/mobile-detect": { "version": "1.4.5", "resolved": "https://registry.npmjs.org/mobile-detect/-/mobile-detect-1.4.5.tgz", @@ -11775,6 +11803,15 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "convert-json-env": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/convert-json-env/-/convert-json-env-1.1.2.tgz", + "integrity": "sha512-lQSybvijksD5nG5XCX3WnUplo7qF1B3d4Iq0UoS76lC1OPLO3p5/nX5Im5/R6zewTGDPK6p7pvKBnAu2YjySxA==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, "convert-source-map": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", @@ -11918,6 +11955,11 @@ "integrity": "sha512-NMt+m9zFMPZe0JcY9gN224Qvk6qLIdqex29clBvc/y75ZBX9YA9wNK3frsYvu2DI1xcCIwxwnX+TlsJ2DSOADg==", "dev": true }, + "dotenv-json": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dotenv-json/-/dotenv-json-1.0.0.tgz", + "integrity": "sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ==" + }, "electron-to-chromium": { "version": "1.4.270", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.270.tgz", @@ -14859,6 +14901,12 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true + }, "mobile-detect": { "version": "1.4.5", "resolved": "https://registry.npmjs.org/mobile-detect/-/mobile-detect-1.4.5.tgz", diff --git a/package.json b/package.json index c56e94a..1dcc801 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,11 @@ "author": "Ceci ", "license": "GPL-3.0", "scripts": { - "serve": "BROWSER=none netlify dev -p 8000", "start": "next dev", "start:prod": "next start", "build": "next build", "lint": "eslint src/**/*.tsx", + "pull": "netlify env:list --json > .env.json", "test": "jest --coverage=false", "test:coverage": "jest --coverage", "deploy:database": "prisma migrate deploy" @@ -21,6 +21,7 @@ "@prisma/client": "^4.4.0", "@reduxjs/toolkit": "^1.9.0", "classnames": "^2.3.2", + "dotenv-json": "^1.0.0", "mobile-detect": "^1.4.5", "next": "^13.0.3", "next-auth": "^4.16.4", @@ -45,6 +46,7 @@ "@typescript-eslint/eslint-plugin": "^5.42.1", "@typescript-eslint/parser": "^5.42.1", "chance": "^1.1.9", + "convert-json-env": "^1.1.2", "eslint": "^8.27.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-react": "^7.31.10", diff --git a/src/components/universal/Footer.tsx b/src/components/universal/Footer.tsx index 804bbb8..7c9712e 100644 --- a/src/components/universal/Footer.tsx +++ b/src/components/universal/Footer.tsx @@ -23,6 +23,7 @@ export function Footer() { height={30} width={110} alt="Netlify" + priority />