oxen-website/README.md

1.3 KiB

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

yarn dev

Open http://localhost:3000 with your browser to see the result.

Setting up your environment

  • Install NVM following the guide at nvm.sh

  • Navigate to project directory

  • Set your NVM version

    nvm install 14.15.0
    nvm use 14.15.0
    
  • Install yarn

    npm i -g yarn
    

Steps to Build to Production

  • Make your local changes

  • Build locally; ensure everything is working

    yarn build
    yarn start
    
  • Commit and push your changes

        git add .
        git commit -m 'My changes'
        git push -u origin
    
  • SSH into the box

    ssh root@116.203.145.108
    
  • Navigate to the directory of the project

    cd /home/ubuntu/oxen.io/
    
  • Pull changes

    git pull origin
    
  • Build on the server

    yarn build
    
  • Restart NGinx and PM2

    systemctl restart nginx && pm2 restart /home/ubuntu/ecosystem.config.js
    

Notes

You can check the status of the server by running

pm2 status