Git Product home page Git Product logo

nexus-4-stock-checker's Introduction

Nexus 4 Stock Checker

This simple node.js app screen scrapes the google play store every couple of minutes to see if the Nexus 4 phone is in stock. If it appears the phone is in stock a SMS message will be sent using Twilio to notify the recipient the phone is now in stock.

Setup

To authenticate and send SMS messages with Twilio you may need to create a settings file that contains all of your Twilo information such as the AccountSid, AuthToken, and phone numbers that will be used to send and receive the SMS messages. In the main director create the following file with the necessary values:

Filename: settings.js

module.exports = {
twilioAccountSid: 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
twilioAuthToken: '6dc9XXXXXXXXXXXXXXXXXXXXXXXXXXX',
twilioFromPhoneNumber: '12069999999',
toPhoneNumber: '12068888888'
};

Instead of using the settings file you can also set the following environmental variables:

TWILIO_ACCOUNT_SID   

TWILIO_AUTH_TOKEN
TWILIO_FROM_PHONE_NUMBER
TO_PHONE_NUMBER

Run Locally

To run locally execute the following command in the main project directory.

	node app

Run on Heroku

To run on Heroku be sure the environment variables above are set in your app. If running on Heroku you also need to create an environment variable named DEPLOYMENT_LOCATION and the value should be 'heroku'. This will prevent the app from attempting to load the settings.js file as it is not included in the git repository and won't be present when deployed to Heroku.

nexus-4-stock-checker's People

Contributors

tehnrd avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.