This repo has been bootstrapped from https://github.com/zeit/now-examples/tree/master/monorepo
api/node/index.js
will serve as a Proxy for your Twitter API so you don't have to expose your credentials on the client.
In order to retrieve your application-only token you can use this shortcut:
node api/node/credentials.js xvz1evFS4wEEPTGEFPHBog L8qq9PZyRg6ieKGEKhZolGC0vJWLw8iEJ88DRdyOg
Note: these values are fake, retrieve yours from here.
Fill the token retrieved from the command above into .env
file.
Run the local env with
now dev
cd www && yarn run cypress-open
Add the secret to your now account with
now secret add twitter-token eHZ6MWV2RlM0d0VFUFRHRUZQSEJvZzpMOHFxOVBaeVJnNmllS0dFS2hab2xHQzB2SldMdzhpRUo4OERSZHlPZw==
Note: these values are fake, retrieve yours from the script above.
Deploy with
now