Skip to content

altherlex/webspider-soundtrack

Repository files navigation

webspider-soundtrack 🕷♫

Nodejs webapp and webcrawler that reads http://download-soundtracks.com/dmca-policy/ and download in local the latest albums.

https://webspider-soundtrack.herokuapp.com (decommissioned)

Main code

How to run

  1. Install postgree and execute $ createdb webspider-soundtrack
  2. Create a db user
psql
CREATE ROLE postgres WITH LOGIN PASSWORD '';
ALTER ROLE me CREATEDB;
  1. clone $ git clone https://github.com/altherlex/webspider-soundtrack.git
  2. $ cd webspider-soundtrack
  3. $ touch .env
  4. Set .env file
DATABASE_URL=postgres://user:[email protected]:5432/webspider-soundtrack
[email protected]
LOGIN_PASS=password
  1. run $ node init_db createTables
  2. run $ node init_db addColumns
  3. $ npm start check http://localhost:3000

Docker

$ git clone https://github.com/altherlex/webspider-soundtrack.git
$ cd webspider-soundtrack
$ docker-compose up
$ docker exec -it webspider-soundtrack_postgres_1 psql -U postgres -c "create database webspidersoundtrack"
$ docker exec -it webspider-soundtrack_app_1 node /usr/src/app/init_db createTables
$ docker exec -it webspider-soundtrack_app_1 node /usr/src/app/init_db addColumns

TODO

  1. Implement ORM: Sequelize
  2. Download and make available somewhere on the cloud.
  3. Heroku has problem running puppeteer (headless chrome)