/freefeed-server

FreeFeed server

Primary LanguageJavaScriptMIT LicenseMIT

FOSSA Status

FreeFeed Server

FreeFeed is a social network that enables you to discover and discuss the interesting stuff your friends find on the web.

FreeFeed is being built as a replacement for FriendFeed, the real-time aggregator and social network where "likes" for user generated content were implemented for the first time.

FreeFeed is based on Pepyatka project

Getting started with FreeFeed on OSX

Setup dependencies via Homebrew

brew install redis
redis-server /usr/local/etc/redis.conf
brew install graphicsmagick
brew install postgres
brew services start postgresql
createuser -P -s freefeed (enter freefeed as password)
createdb -O freefeed freefeed

Or setup dependencies via Docker

  1. brew install graphicsmagick
  2. Install and run Docker
  3. docker-compose up -d

Then setup NodeJS environment and the app

brew install nvm
brew install yarn
nvm install
yarn install
yarn knex --env production migrate:latest
mkdir ./public/files/attachments/thumbnails/ && mkdir ./public/files/attachments/thumbnails2/

Now create config config/local.json with some random secret string: { "secret": "myverysecretstring" }

yarn start

Custom configuration

If you have other PostgreSQL (or any other) settings than default, you should configure FreeFeed server in a proper way.

The FreeFeed server uses node-config for configuration. You can create your own local configuration file to override any of default values. See the Configuration Files page of node-config documentation for details.

The default configuration is defined in config/default.js file. The config/test.js and config/default-travis.json files can be used as an example of customized configurations (for the 'test' and Travis CI environments accordingly).

Testing

  1. Create a Postgres database freefeed_test:
    • createdb -O freefeed freefeed_test if you're using local Postgres
    • open a terminal to Docker container, run Postgres CLI (psql -U freefeed), create a database create database freefeed_test
    • or use any other appropriate method such as pgAdmin
  2. yarn test

Testing docker image

make image
docker compose up -d
make docker-run

Pushing docker image

Get personal access token with write:packages and read:packages scopes.

docker login docker.pkg.github.com -u USERNAME -p TOKEN
make push

Database migrations

If you're getting errors related to database structure or relations, run yarn knex --env production migrate:latest to run migrations

Contribute

  1. How to contribute

Questions or need help?

You can drop your question here.

Copyright and license

FreeFeed is licensed under the MIT License.

License

FOSSA Status