Compare commits

...

9 Commits
master ... dev

Author SHA1 Message Date
Jef Roosens c1a68ff66c Merge pull request 'Update nginx Docker tag to v1.21.5' (#13) from renovate/nginx-1.x into dev
ci/woodpecker/push/woodpecker Pipeline failed Details
Reviewed-on: #13
2021-12-30 14:16:57 +01:00
Renovate Bot 902c8a3884 Update nginx Docker tag to v1.21.5
ci/woodpecker/push/woodpecker Pipeline failed Details
ci/woodpecker/pr/woodpecker Pipeline failed Details
2021-12-30 13:01:09 +00:00
Jef Roosens 2bcfeaae83
Just getting the ci to do stuff
ci/woodpecker/push/woodpecker Pipeline failed Details
2021-12-30 12:41:28 +01:00
Jef Roosens abe6a938de
Removed typo; split into test group
ci/woodpecker/push/woodpecker Pipeline failed Details
2021-12-30 08:44:49 +01:00
Jef Roosens 63d9810f42
Idme
ci/woodpecker/push/woodpecker Pipeline was successful Details
2021-12-30 08:40:54 +01:00
Jef Roosens 40d491284e
Trying out some stuff
ci/woodpecker/push/woodpecker Pipeline failed Details
2021-12-30 08:39:33 +01:00
Jef Roosens a1b35747af
Removed group from ci test
ci/woodpecker/push/woodpecker Pipeline was successful Details
2021-12-30 08:31:55 +01:00
Jef Roosens 83ba3764c6
Added ci pipeline
ci/woodpecker/push/woodpecker Pipeline was successful Details
2021-12-30 08:29:23 +01:00
Jef Roosens 1f52afdfe2
Ran linter 2021-12-29 19:44:08 +01:00
6 changed files with 45 additions and 27 deletions

19
.woodpecker.yml 100644
View File

@ -0,0 +1,19 @@
pipeline:
install:
image: 'node:17.3.0'
commands:
- yarn install
# This step makes sure the project properly builds.
build:
image: 'node:17.3.0'
group: test
commands:
- yarn run build
lint:
image: 'node:17.3.0'
group: test
commands:
- yarn run lint

View File

@ -15,7 +15,7 @@ RUN yarn run build
# =====Packaging inside an Nginx container===== # =====Packaging inside an Nginx container=====
FROM nginx:1.21.4-alpine FROM nginx:1.21.5-alpine
# Copy over the Nginx config files # Copy over the Nginx config files
COPY nginx/nginx.conf /etc/nginx/nginx.conf COPY nginx/nginx.conf /etc/nginx/nginx.conf

View File

@ -1,15 +1,15 @@
const API_PREFIX = "/api/v1" const API_PREFIX = '/api/v1'
export class RbApi { export class RbApi {
async get_json(path) { async get_json (path) {
const url = `${API_PREFIX}${path}` const url = `${API_PREFIX}${path}`
let res = await fetch(url) const res = await fetch(url)
return await res.json() return await res.json()
} }
async sections() { async sections () {
let res = await this.get_json("/sections") const res = await this.get_json('/sections')
return res["sections"] return res.sections
} }
} }

View File

@ -3,9 +3,9 @@ import { ref } from 'vue'
import { RbApi } from '../api/v1' import { RbApi } from '../api/v1'
import { Section } from '../models' import { Section } from '../models'
let sections = ref([]) const sections = ref([])
let api = new RbApi() const api = new RbApi()
await api.sections().then(res => { await api.sections().then(res => {
sections.value = res sections.value = res
}) })
@ -14,9 +14,9 @@ await api.sections().then(res => {
<template> <template>
<div> <div>
<p>yeet</p> <p>yeet</p>
<ul> <ul>
<li v-for='section in sections'> <li v-for="section in sections">
{{ section }} {{ section }}
</li> </li>
</ul> </ul>

View File

@ -29,21 +29,21 @@ export const sections = [
is_private: false, is_private: false,
is_archived: false is_archived: false
} }
]; ]
export const posts = [ export const posts = [
{ {
id: 'af08bbcd-f6eb-446e-b355-13e0a0ef008e', id: 'af08bbcd-f6eb-446e-b355-13e0a0ef008e',
section_id: sections[0]['id'], section_id: sections[0].id,
is_private: false, is_private: false,
is_archived: false is_archived: false
} }
]; ]
export const versions = [ export const versions = [
{ {
id: '8c5bc2f9-e52f-4e19-bd76-119cc42ff863', id: '8c5bc2f9-e52f-4e19-bd76-119cc42ff863',
post_id: posts[0]['id'], post_id: posts[0].id,
title: 'This Is A Title', title: 'This Is A Title',
publish_date: '2021-12-28', publish_date: '2021-12-28',
content: 'Hello. This is some content!', content: 'Hello. This is some content!',

View File

@ -1,5 +1,5 @@
import { createServer, Model } from 'miragejs'; import { createServer, Model } from 'miragejs'
import { sections, posts, versions } from './models'; import { sections, posts, versions } from './models'
export function makeServer ({ environment = 'development' } = {}) { export function makeServer ({ environment = 'development' } = {}) {
const server = createServer({ const server = createServer({
@ -12,27 +12,26 @@ export function makeServer ({ environment = 'development' } = {}) {
}, },
seeds (server) { seeds (server) {
sections.forEach(s => server.create('section', s)); sections.forEach(s => server.create('section', s))
posts.forEach(s => server.create('post', s)); posts.forEach(s => server.create('post', s))
versions.forEach(s => server.create('version', s)); versions.forEach(s => server.create('version', s))
}, },
routes () { routes () {
this.namespace = 'api/v1'; this.namespace = 'api/v1'
// Offsets & limits don't need to be implemented here, as the data set isn't large enough to require this yet // Offsets & limits don't need to be implemented here, as the data set isn't large enough to require this yet
this.get('/sections', (schema) => { this.get('/sections', (schema) => {
return schema.sections.all(); return schema.sections.all()
}) })
this.get('/posts', (schema) => { this.get('/posts', (schema) => {
return schema.posts.all(); return schema.posts.all()
}) })
this.get('/versions', (schema) => { this.get('/versions', (schema) => {
return schema.versions.all(); return schema.versions.all()
}) })
} }
}); })
return server; return server
} }