Skip to content

AmritKumar/zil-twitter

Repository files navigation

SocialPay

Dependencies

https://www.docker.com/

You will need to add a .env file in the backend folder with the required keys. The file should look something like this:

TWITTER_CONSUMER_KEY=xxxx
TWITTER_CONSUMER_SECRET=xxxx
JWT_SECRET=testsecret
OWNER_PRIVATE_KEY=xxxx
  • To acquire twitter keys, sign up for a developer account on twitter and create a new app.
    • You must change the callback URL appropriately. If you plan on running locally, this should be localhost:3000/twitter_callback.
    • Then, copy the consumer API and consumer secret keys into the .env file shown above.
  • The JWT secret can be any string.
  • OWNER_PRIVATE_KEY should be your Zilliqa wallet private key. Testnet keys can be generated here.

Local build

Ensuring that you have installed docker, build from the image using:

docker-compose build

This might take a while, as there are many things that need to be installed. Once this is done, we can bring up the frontend, backend, and database servers using:

docker-compose up -d

You should see the following messages, followed by setup logs. Keep an eye out for any major erros.

Starting zil-twitter_mongo_1 ... done
Starting zil-twitter_backend_1 ... done
Starting zil-twitter_frontend_1 ... done

If this works, the backend should be running on localhost:4000. To interact with the app, go to http://localhost:3000 in your browser.

Production build

sudo docker-compose -f docker-compose.prod.yml build

sudo docker-compose -f docker-compose.prod.yml up -d

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published