Git Product home page Git Product logo

inck's Introduction

Inck

Space efficient, time efficient, web-based note taking app with real time collaboration.

Built in Next.js using WebGL and web sockets.

Screenshots

alt text alt text alt text alt text alt text

Try it out at inck.io

Contents

Dependencies

Node.js, MongoDB, Redis, as well as a few Node.js packages.

Installation

  1. Install MongoDB
brew install mongodb
mkdir -p /data/db
sudo chown -R `id -un` /data/db
mongod
  1. Install Node.js & NPM
  2. Install and start redis
brew install redis
redis-server
  1. Open the project in command-line
  2. Install server and client dependencies using npm install
  3. Start project in development mode using npm run dev-all

Usage

Open your browser and go to https://localhost:3080.

Deployment

This project has 3 components: server, client, and common types.

Build everything with npm run build-all.

Start everything with npm run start-all or just the server/client with npm run start-server and npm run start-client

PM2

The app is deployed using PM2 on an Amazon EC2 virtual machine. There are two processes: "client" and "server". Both processes start automatically after a reboot.

Cheatsheet

Restart processes using

  • pm2 restart server
  • pm2 restart client
  • pm2 restart all
  • don't forget to rebuild the client if changed by running npm run build in client folder

Reset restart counters using

  • pm2 reset all

Processes were created by running the following commands in the apropriate folders:

  • pm2 start "npm run start" --name server
  • pm2 start "npm run start" --name client

Ports

The frontend is running on port 3080, not 80, due to permission issues.

Traffic is redirected from port 80 to 3080 with the following command:

sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3080

This command is scheduled to run at startup automatically using chromtab crontab -e command, read more about chrontab here.

Other

See number of lines of code using npm run line-count.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.