Skip to content

Commit

Permalink
refactor: split into two micros and use deta-base-orm
Browse files Browse the repository at this point in the history
  • Loading branch information
BetaHuhn committed Aug 23, 2023
1 parent 63cf695 commit c8c465b
Show file tree
Hide file tree
Showing 180 changed files with 21,538 additions and 481 deletions.
30 changes: 18 additions & 12 deletions Spacefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,32 @@ v: 0
app_name: WebCrate
icon: client/static/icon.png
micros:
- name: app
src: .
- name: server
src: ./server
path: /api
engine: nodejs16
primary: true
dev: npm run start
dev: npm run dev
commands: ['npm run build']
include:
- build
- dist
- package.json
- node_modules
run: node build/index.js
public_routes:
- /_nuxt/*
- /link/public/*
- /crate/public/*
- /api/public/*
- /public/*
- /img/*
presets:
api_keys: true
env:
- name: DATA_KEY
provide_actions: true
provide_actions: true

- name: client
src: ./client
engine: static
primary: true
dev: npm run dev
commands: ['npm run build']
serve: dist
public_routes:
- /_nuxt/*
- /link/public/*
- /crate/public/*
15 changes: 11 additions & 4 deletions nuxt.config.js → client/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pkg from './package.json'

export default {
srcDir: 'client/',
srcDir: 'src/',
components: true,

target: 'static',
Expand All @@ -13,9 +13,9 @@ export default {
host: '0.0.0.0'
},

serverMiddleware: [
'@/../server/index.ts'
],
// serverMiddleware: [
// '@/../server/index.ts'
// ],

env: {
appVersion: pkg.version
Expand Down Expand Up @@ -80,9 +80,16 @@ export default {
],

axios: {
proxy: true,
browserBaseURL: '/'
},

// proxy: {
// "/api/": {
// target: "/server/"
// }
// },

css: [
'@/assets/main.scss'
],
Expand Down

0 comments on commit c8c465b

Please sign in to comment.