This project was generated with Angular CLI version 1.4.9.
This is a super simple Angular 4 application that was inspired by this demo of taking a snapshot in the browser.
It's intended to POST the snapshot along with a status of up to 280 characters to a Node backend that uses Express which then posts to the Twitter account.
A simple use for this application might be for a conference or event to allow users to post a selfie from their event to the event's Twitter feed.
From the project root, run npm run build
to build the Angular app and launch the Express server. The app will then be running at http://localhost:3000
.
Launching the camera (only shown if browser blocks auto launch):
Camera interface:
Sharing Via Twitter:
Create a copy of server/config/config.template.js in the same directory and populate it with your Twitter API info. Add that file to .gitignore to keep it out of source control.
Update the environment.* files as necessary to point the service at the proper endpoint.
If you'd like to use SSL (Recommended - some browsers block getUserMedia() in insecure contexts), edit the config
as necessary:
config.ssl = {};
config.ssl.useSSL = false;
config.ssl.keyPath = '';
config.ssl.certPath = '';
If you choose to use SSL make sure that the Angular service URL (in environment.ts
) reflects https!
This is my first Node/Express app. It's a simple one, but feedback is welcomed.