Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/willnet/server-for-getimagedata
https://github.com/willnet/server-for-getimagedata
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/willnet/server-for-getimagedata
- Owner: willnet
- Created: 2015-10-17T01:56:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-17T06:21:43.000Z (over 9 years ago)
- Last Synced: 2025-01-02T23:33:35.976Z (23 days ago)
- Language: JavaScript
- Size: 359 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# server-for-getimagedata
- [$.getImageData](http://www.maxnov.com/getimagedata/) を使用するために必要なサーバ
- 指定されたURLの画像をbase64に変換し、JSONP形式で返します
- node.js を使用しています
- heroku で動かすこともできます## ローカルで動かす
もし node.js をインストールしていなければインストールします。mac なら
```sh
$ brew install node
```でインストールできます。また、画像処理用にimagemagick(もしくはGraphicsMagick)が必要です。これもインストールしていなければインストールします。
```sh
$ brew install imagemagick
```その後次のようにしてサーバを立ち上げます。
```sh
$ git clone https://github.com/willnet/server-for-getimagedata.git
$ cd server-for-getimagedata
$ npm install
$ npm start
````http://localhost:5000/?url=画像のURL&callback=コールバック用の関数名` でアクセスできます。ちゃんと動いているかどうか、適当な画像のURLとコールバック名を指定して試してみると良いでしょう。
## Deploying to Heroku
```
$ heroku create
$ git push heroku master
$ heroku open
```