This is a simple demo of how one would enable POST requests in a fastboot application. Examples are provided for both in development (ember serve) and using the production ready fastboot-app-server. The commits should provide a good story of the work needed to enable this in your own app.
To POST to this app, try this example cURL:
curl -X POST \
http://localhost:4200/ \
-H 'accept: text/html' \
-H 'content-type: application/json' \
-d '{
"message": "This was in the POST request!!"
}'
To run the example 'production' server run:
npm run example-server
You will need the following things properly installed on your computer.
- Git
- Node.js (with NPM)
- Ember CLI
- Google Chrome
git clone <repository-url>
this repositorycd ember-fastboot-post-example
npm install
ember serve
- Visit your app at http://localhost:4200.
- Visit your tests at http://localhost:4200/tests.
Make use of the many generators for code, try ember help generate
for more details
ember test
ember test --server
ember build
(development)ember build --environment production
(production)
Specify what it takes to deploy your app.