Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
fix: nextjs netlify warning
Browse files Browse the repository at this point in the history
- cleaned up local development
  • Loading branch information
cecilia-sanare committed Feb 23, 2024
1 parent d8517eb commit ba24276
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 3 deletions.
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. -->
- 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-id>"
DISCORD_CLIENT_SECRET="<discord-client-secret>"
DATABASE_URL="<database-url>"
```

- Install the Node Modules
Expand All @@ -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
Expand Down
8 changes: 8 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
48 changes: 48 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"author": "Ceci <admin@cecilias.me>",
"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"
Expand All @@ -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",
Expand All @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/components/universal/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export function Footer() {
height={30}
width={110}
alt="Netlify"
priority
/>
</Button>
<div className={styles.externalLinks}>
Expand Down

0 comments on commit ba24276

Please sign in to comment.