mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-03 13:28:44 +00:00
Revert "Stop publish examples to mongoose repo"
This reverts commit 1a17e17c462bdd4e1d26d8742f8b7087273e04c2. PUBLISHED_FROM=80028de308c9a021955d1425d2bfee8feb85f193
This commit is contained in:
1 parent
7cc7df8c0e
commit
eaef5bd133
351 files changed
+195424
No files matched your search
@@ -0,0 +1,31 @@
|
||||
RESTful server with Amazon S3 upload example
|
||||
============================================
|
||||
|
||||
This example demonstrates how Mongoose could be used to implement a RESTful
|
||||
service that uses another RESTful service to handle it's own API call.
|
||||
This example takes form data and uploads it as a file to Amazon S3.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Amazon S3 account security credentials: Access Key ID and Secret Access
|
||||
Key ID. Get them from the Amazon IAM console.
|
||||
- Amazon S3 bucket.
|
||||
|
||||
## Building and running the example
|
||||
|
||||
$ git clone https://github.com/cesanta/mongoose.git
|
||||
$ cd mongoose/examples/restful_server_s3
|
||||
$ make
|
||||
$ ./restful_server_s3 -a ACCESS_KEY_ID -s SECRET_ACCESS_KEY_ID
|
||||
Starting RESTful server on port 8000
|
||||
|
||||
Then, open a browser on `http://localhost:8000`
|
||||
|
||||
Note: If you're getting a *Temporary Redirect* error, look what is the
|
||||
Endpoint value is. It's likely that you have something like
|
||||
`BUCKET_NAME.S3_ZONE.amazonaws.com`.
|
||||
Change the *Host* field to `S3_ZONE.amazonaws.com and retry`.
|
||||
|
||||
## Screenshot
|
||||
|
||||

|
||||
Reference in new issue
Block a user