Skip to content

FreeFeed/freefeed-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 macOS

Set up 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 set up dependencies using Docker

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

Then prepare Node.js environment and the app

  1. Set up JS dependencies:
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/
  1. Create temporary directories for attachments:
mkdir -p /tmp/pepyatka-media/attachments/thumbnails
mkdir -p /tmp/pepyatka-media/attachments/thumbnails2
mkdir -p /tmp/pepyatka-media/attachments/anotherTestSize
  1. Create config config/local.json with some random secret string: { "secret": "myverysecretstring" }.

  2. Now you are ready to run the FreeFeed server:

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:
    • if using local Postgres: run locally createdb -O freefeed freefeed_test
    • if using Docker: open a terminal to the Docker container, run Postgres CLI (psql -U freefeed), then create the 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