mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-25 13:59:09 +00:00
Minor tweaks to README language and folder name
This commit is contained in:
parent
6b6b2fa11a
commit
842e5e3476
@ -1,13 +1,13 @@
|
|||||||
# Realm-JS Interprocess Example
|
# Realm-JS Interprocess Example
|
||||||
Small example of interprocess support with Realm and Node.js
|
Example of interprocess support using Realm and Node.js
|
||||||
|
|
||||||
The example makes use of [Winston](https://github.com/winstonjs/winston), a
|
The example makes use of [Winston](https://github.com/winstonjs/winston), a
|
||||||
logging library, and includes `winston-realm.js` which defines a custom transport
|
logging library, and includes `winston-realm.js` which defines a custom transport
|
||||||
utilizing Realm for storage. The main file, `index.js` is a basic
|
utilizing Realm for storage. The main file, `index.js` is an
|
||||||
[Express](https://github.com/expressjs/express) app. The app listens on port
|
[Express](https://github.com/expressjs/express) app handling HTTP requests. The
|
||||||
3000 and responds with "Hello World!" at the base path `/` and logs at `info`
|
app listens on port 3000 and responds with "Hello World!" at the base path `/`
|
||||||
"Handled Hello World" to Winston. At any other path it returns a `404` error and
|
and logs at `info` "Handled Hello World" to Winston. At any other path it
|
||||||
logs an error message to Winston with URL in question.
|
returns a `404` error and logs an error message to Winston with URL in question.
|
||||||
|
|
||||||
Since the log messages are being stored in a Realm (`winston.realm`), we can
|
Since the log messages are being stored in a Realm (`winston.realm`), we can
|
||||||
listen for changes on another process. The `listener.js` is a small example of
|
listen for changes on another process. The `listener.js` is a small example of
|
@ -5,6 +5,7 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^4.14.0",
|
"express": "^4.14.0",
|
||||||
|
"realm": "^0.15.0",
|
||||||
"winston": "^2.3.0"
|
"winston": "^2.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
@ -14,4 +15,3 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
}
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user