Skip to content

TubePeek/TubePeek_Server

Repository files navigation

TubePeek_Server

Node Dependencies
npm install
Db Environment settings

Windows

Go to your Environment variables and add a System variable:

name: WatchWith_DbEnv
value: development | AmazonEc2

Ubuntu

Go into ~/.bashrc and add the below line:

export WatchWith_DbEnv="development" # development | AmazonEc2

Now, open a terminal window and run:
source ~/.bashrc
Databases setup

Postgres and Mongo is required

Create a Postgres database with name 'tubepeekdb' with owner 'postgres' and password 'asdffdsa'.

Create a mongo database with name 'tubepeekmongodb'.

Start the Mongo server with:

mongod
Starting the server

Local machine (Development mode)

npm run startdev

It'll restart our node server during development when files change so that we see the effects of the change immediately.

On VPS (Production mode)

pm2 start TubePeekServer.js
Database schema migration

If your knexfile.js does not exist then run:

knex init
knex migrate:make watchwithdb
knex migrate:latest --env development
Running tests
npm test
Viewing logs

To view pretty logs during development, access the following address on a browser:

http://localhost:3700/logs
For the Chrome Extension

There is no README.md file for the chrome extension cos I think it'll interfere with Chrome loading the extension. Hence the need for this section. Let's begin.

Further study

Follow this to understand the database migration things with knex:

License

MIT License

About

The server for the 'tubePEEK' google chrome extension. It makes possible realtime notifications of when your friend is watching a Youtube video

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published