Skip to content

abhi12299/website

Repository files navigation

Portfolio Website using Next.JS

To run this locally, clone this repo and cd in the project directory

  1. echo "MONGO_URI=mongodb://localhost:27017/website
        PORT=3001
        REDIS_HOST='127.0.0.1'
        REDIS_PORT=6379
        REDIS_PASSWORD=''
        OAUTH_CLIENT_ID='your-google-oauth-client-id'
        CLIENT_SECRET='your-google-ouath-client-secret'
        JWT_SECRET='your-jwt-secret'
        GMAIL_USER='gmail-email'
        GMAIL_PASS='gmail-pass'
        ELASTIC_URL='elastic-url'" > .env
    (* The server uses NodeMailer to send emails to admins!)
  2. Make a file
    constants/apiKeys.js
    with the following contents:
    export default {
        TINY_MCE_API_KEY: 'your-api-key',
        WIDGETPACK_PLUGIN_ID: 'your-plugin-id',
        GTAG_ID: 'your-google-tag-id'
    };
  3. For the first time execution, run
    node init.js
  4. Install packages with
    yarn
  5. Development server
    yarn dev
  6. Production build
    yarn build
  7. Staging server
    yarn start:stag
  8. Production server
    yarn start
  9. Cluster with PM2
    pm2 start process.json
  10. Reload PM2 (zero downtime updates)
    pm2 reload process.json

To analyse bundle sizes,

For server,

yarn run analyse-server

For client,

yarn run analyse-client

To access dashboard routes, Assuming the website is running on localhost:3000

  1. Go to https://console.developers.google.com/ and create an OAUTH2 Api key for web. Specify localhost:3000 as authorized origin and localhost:3000/auth/redirect as redirect URI.
  2. Copy the client id and secret into .env file.
  3. Go to localhost:3000/auth/login and you should be able to login with email that you specified earlier when doing node init.js

About

Portfolio website code. Deprecated in favour of website-nuxt https://github.com/abhi12299/website-nuxt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published