Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circleci project setup #66

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
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