Onewheel-pinger is an SMS application that allows users to send their order number and delivery email address to a phone number and receive notifications as to if/when their onewheel delivery changes.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
This project is a node.js application.
Before installing, download and install node.js.
This project uses mongodb to store user data. For use in development, it is highly recommended that you install mongodb locally.
Clone the repo
$ git clone https://github.com/jdtzmn/onewheel-pinger
Cloning into onewheel-pinger...
Run npm install
npm install
Or using yarn
yarn
Once the dependencies are installed, environment variables need to be set:
This project uses twilio to send and receive texts as well as mongo to store user data.
For utility, one can use a .env
file to store all of these environment variables locally. Learn more here.
To find the twilio sid and auth_token, read their docs here.
To learn about the mongo connection string, read their docs here.
-
ENCRYPTION_KEY
- a 32 byte key for encrypting the user data before sending it to the mongo database -
TWILIO_SID
- the SID that is given by twilio -
TWILIO_TOKEN
- the auth_token that is given by twilio
PORT
- a port to run the web server on
Default:
3000
MONGO_STRING
- the connection string used to connect to a mongo database
Default:
'mongodb://localhost'
MONGO_DB
- the database name to use after connecting
Default:
'test'
These unit tests test each individual component of the app
npm test
These coding style tests ensure that the code matches the expected coding style
npm run lint
These tests are also run before every commit as a git precommit
script
To deploy, a paid twilio account as well as a mongo database are required.
-
express - The web server used
-
twilio - SMS integration
-
mongo - Used to store user data
-
cron - Used to run scheduled daily jobs
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Jacob Daitzman - Initial work - jdtzmn
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- PurpleBooth for this README.md template