OpenSCAD and CadQuery working together in dev

Still clean up of the backend/lamdas, and there's a conda permission
issue when deploying the Cadquery image
This commit is contained in:
Kurt Hutten
2021-04-18 17:46:03 +10:00
parent 7733694032
commit 35d5c02f96
9 changed files with 60 additions and 90 deletions

View File

@@ -1,4 +1,4 @@
let openScadBaseURL = process.env.CADQUERY_BASE_URL
import { lambdaBaseURL } from './common'
export const render = async ({ code }) => {
const body = JSON.stringify({
@@ -6,7 +6,7 @@ export const render = async ({ code }) => {
file: code,
})
try {
const response = await fetch(openScadBaseURL, {
const response = await fetch(lambdaBaseURL + '/cadquery/stl', {
method: 'POST',
headers: {
'Content-Type': 'application/json',

View File

@@ -0,0 +1,3 @@
export const lambdaBaseURL =
process.env.CAD_LAMBDA_BASE_URL ||
'https://t7wdlz8ztf.execute-api.us-east-1.amazonaws.com/dev2'

View File

@@ -1,6 +1,4 @@
let openScadBaseURL =
process.env.OPENSCAD_BASE_URL ||
'https://x2wvhihk56.execute-api.us-east-1.amazonaws.com/dev'
import { lambdaBaseURL } from './common'
export const render = async ({ code, settings }) => {
const pixelRatio = window.devicePixelRatio || 1
@@ -16,7 +14,7 @@ export const render = async ({ code, settings }) => {
file: code,
})
try {
const response = await fetch(openScadBaseURL + '/render', {
const response = await fetch(lambdaBaseURL + '/openscad/preview', {
method: 'POST',
headers: {
'Content-Type': 'application/json',