diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..01b90eec --- /dev/null +++ b/.circleci/config.yml @@ -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 \ No newline at end of file diff --git a/guestbook.js b/guestbook.js index 22363fbc..d912aed9 100644 --- a/guestbook.js +++ b/guestbook.js @@ -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' }); }, @@ -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,