Ohe
This is ohe, the code behind App.net's reference private messaging UI.
Install / Use
/learn @appdotnet/OheREADME
ohe — Private messaging on App.net
This is ohe, the code behind App.net's reference private messaging UI called Omega. It's the same code we run in production for omega.app.net. This code is ready for local deployment, deployment on Heroku, or larger scale deployment, if you want. It is an example of a thick Javascript application with some server logic.
It contains:
- An Angular.js application for the UI
- An API proxy to allow API calls to be made as session-authenticated calls
- A consumer of the streaming API
Requirements
- Node.js 0.8.xx+
- Redis server
Installation — development
-
Create a new application on App.net. Note the client_id and client_secret. The redirect URI should be /return on the host you're going to use for ohe, e.g., http://localhost:8666/return.
-
Create a config.json in the root of your application. Add your client_id/client_secret where prompted, as well as a random secret to protect your sessions. Update your redis URL if necessary. Make sure you don't check in any sensitive data, e.g., client secret or session secret, where it will be exposed publicly.
This configuration is read via the nconf configuration library. It is possible to specify configuration via the config file, via environment variables or via the command line.
-
npm install -
node app.js -
Open your browser to http://localhost:8666/
Optional — deploy to Heroku
If you're deploying to Heroku, you probably want to configure your app with environment variables instead. Try this:
heroku config:set NODE_ENV=production adn__client_id=<client_id> adn__client_secret=<client_secret> adn__scope=messages deploy__heroku=1
deploy__heroku=1 causes the app to use Heroku environment variables for the Redis URL (assumes Redis To Go) and HTTP port.
Note that you might want to set adn__stream_key to a different value for your Heroku config so that your development and Heroku environments use different connections to the App.net streaming API.
Custom domains on Heroku are not currently supported, unless you have a custom SSL certificate. Please use a .herokuapp.com domain so that you can use SSL.
Optional — multiprocess deployment
If you are running more than one process, e.g., a worker and several web nodes, you can elect to pipe stream updates through Redis. You must ensure that all processes run with the deploy:multiprocess option enabled, and exactly one process runs with the deploy:master flag set to a true value.
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
