Skip to content
22 changes: 22 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2.1

commands:
return_error:
steps:
- run: return 1

jobs:
my_job:
docker:
- image: circleci/node:13.8.0
steps:
- return_error
- run:
name: Non-Zero error
command: echo "non-zero error"
when: on_fail

workflows:
my_workflow:
jobs:
- my_job
6 changes: 3 additions & 3 deletions guestbook.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* Web application
*/
const apiUrl = '';
const apiUrl = 'https://eu-gb.functions.appdomain.cloud/api/v1/web/2405b280-c725-44a2-84ad-159bbb34ac3f/guestbook';
const guestbook = {
// retrieve the existing guestbook entries
get() {
return $.ajax({
type: 'GET',
url: `${apiUrl}/entries`,
url: `${apiUrl}/read-guestbook-entries-sequence.json`,
dataType: 'json'
});
},
Expand All @@ -16,7 +16,7 @@ const guestbook = {
console.log('Sending', name, email, comment)
return $.ajax({
type: 'PUT',
url: `${apiUrl}/entries`,
url: `${apiUrl}/save-guestbook-entry-sequence.json`,
contentType: 'application/json; charset=utf-8',
data: JSON.stringify({
name,
Expand Down