Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

DylanAllen/dylanallen

Repository files navigation

DylanAllen.net

This is my personal site, built with Next.JS, TypeScript, Firebase Authentication, FireStore DB, & Vercel.

Setup

Download and install

git clone https://github.com/DylanAllen/dylanallen.git
cd dylanallen
npm i

Setup a Firebase project and create a firebase.config.ts file (for authentication and comments)

firebase.config.ts

export const firebaseConfig = {
    apiKey: "...",
    authDomain: "...",
    databaseURL: "...",
    projectId: "...",
    storageBucket: "...",
    messagingSenderId: "...",
    appId: "...",
    measurementId: "..."
  };
 

Setup a Firebase Service account and create a .env.local with the following info (this is for server side comment posting and approval):

project_id=...
private_key=-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n
client_email=...
ga_id=YOUR_GOOLE_ANALYTICS_ID

Run locally:

npm run dev

Deploy

Deploy it to the cloud with Vercel (Documentation).

Install the Vercel CLI if you don't already have it:

npm i -g vercel

Dev deployment:

vercel

Prod deployment:

vercel --prod