mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
17 lines
548 B
Bash
Executable File
17 lines
548 B
Bash
Executable File
#!/bin/bash
|
|
set -x
|
|
|
|
./build.sh
|
|
|
|
# test it
|
|
docker stop test-mongo-func
|
|
docker rm test-mongo-func
|
|
|
|
docker run -p 27017:27017 --name test-mongo-func -d mongo
|
|
|
|
echo '{ "title": "My New Post", "body": "Hello world!", "user": "test" }' | docker run --rm -i -e FN_METHOD=POST -e FN_PATH=/posts -e DB=mongo:27017 --link test-mongo-func:mongo -e TEST=1 username/func-blog
|
|
docker run --rm -i -e FN_METHOD=GET -e FN_PATH=/posts -e DB=mongo:27017 --link test-mongo-func:mongo -e TEST=1 username/func-blog
|
|
|
|
docker stop test-mongo-func
|
|
docker rm test-mongo-func
|