6

GitHub - Krisseck/Hashtag-Wall-Server: Hashtag wall that displays posts from soc...

 1 year ago
source link: https://github.com/Krisseck/Hashtag-Wall-Server
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Hashtag Wall Server

Hashtag Wall Client Example

Hashtag wall that displays posts from several social media sources. You can specify the hashtag to monitor and the server collects these posts. Example client website can be found at https://github.com/Krisseck/Hashtag-Wall-Client

This is the server component of the wall. It's a node.js express server that provides a JSON API for displaying the social media posts.

Client: http://hashtag.polso.info

API: http://hashtag.polso.info:8080/posts

Admin: http://hashtag.polso.info:8080/admin (username: admin, password: password)

Features

  • Cron process that fetches the social media posts
  • Supports multiple social media platforms (currently Instagram & Twitter)
  • Admin interface for displaying and deleting posts
  • Ignore specific user's posts

Requirements

  • Tested with Node.js v10.13.0 (LTS), should work with other 10.x versions aswell.
  • Yarn
  • MySQL-server

Install

Run yarnto install dependencies

Copy config.js.example to config.js and change the values as needed.

To install database tables, run:

node install-dbs.js

Note: Running this script will drop the tables if already existing!

Running the server

app.js is the main API server.

cron.js is the background process that fetches the social media posts.

You can run these scripts with just node app.js and node cron.js, although I recommend using a process manager like PM2. Then the commands will be:

pm2 start app.js
pm2 start cron.js

Hosting

Need help with the project or looking for hosting? Contact me at [email protected]


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK