Skip to content

Commit 9aab580

Browse files
author
Andreas Savvides
committed
Update README with server info
1 parent 93b6178 commit 9aab580

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,26 @@
88
git clone https://github.com/AnSavvides/react-digits.git
99
cd react-digits
1010
npm install
11+
```
12+
13+
### Building JavaScript files in one terminal
14+
15+
```bash
1116
grunt watch
1217
```
1318

14-
Open [`src/ReactDigits.js`](src/ReactDigits.js) and enter your consumer key inside the `componentWillMount` function where we first initialize Digits.
19+
Now open [`src/ReactDigits.js`](src/ReactDigits.js) and enter your consumer key inside the `componentWillMount` function where we first initialize Digits.
1520

16-
In another terminal window run a simple HTTP server locally:
21+
### Running a server in another terminal
1722

1823
```bash
19-
python -m SimpleHTTPServer 8000
24+
python server.py
2025
```
2126

22-
Head over to `localhost:8000` and you should be able to see this code in action.
27+
Head over to `localhost:5000` and you should be able to see this code in action; try and log in using Digits!
2328

2429
## Notes
2530

26-
- This is a front-end only implementation and it is assumed that you have written code to handle the validation logic in the back-end. See the `onLoginSuccess` function in [`src/ReactDigits.js`](src/ReactDigits.js) where we make a `POST` request with `JSON` to a `/user/verify` endpoint
2731
- Digits is not available as an npm package, but rather over CDN; because of that, we had to include the Digits web SDK over CDN & reference it in our `webpack` configuration in [`externals`](http://webpack.github.io/docs/library-and-externals.html). As a side effect, this is stopping us from creating this solution as a reusable npm-installable component.
2832

2933
## License

0 commit comments

Comments
 (0)