Skip to content

Commit

Permalink
- feature: added local dev tooling for android
Browse files Browse the repository at this point in the history
  • Loading branch information
agallardol committed Oct 26, 2023
1 parent 4f4e5a6 commit 466018e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
4 changes: 3 additions & 1 deletion apps/shinkai-app/capacitor.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ const config: CapacitorConfig = {
appName: 'Shinkai',
webDir: '../../dist/apps/shinkai-app',
server: {
androidScheme: 'https'
androidScheme: 'https',
url: process.env.SERVE ? 'http://10.0.2.2:9000' : undefined,
cleartext: process.env.SERVE ? true : false,
}
};

Expand Down
5 changes: 4 additions & 1 deletion apps/shinkai-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"private": true,
"version": "0.0.1",
"type": "module",
"description": "Shinkai Multiplatform App"
"description": "Shinkai Multiplatform App",
"scripts": {
"serve:android": "SERVE=true npx cap run android"
}
}
15 changes: 14 additions & 1 deletion apps/shinkai-app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"executor": "@nx/vite:dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "shinkai-app:build"
"buildTarget": "shinkai-app:build",
"port": 9000
},
"configurations": {
"development": {
Expand All @@ -70,6 +71,18 @@
}
}
},
"serve:android": {
"executor": "nx:run-script",
"defaultConfiguration": "development",
"options": {
"cwd": "apps/shinkai-app",
"script": "serve:android"
},
"configurations": {
"development": {},
"production": {}
}
},
"preview": {
"executor": "@nx/vite:preview-server",
"defaultConfiguration": "development",
Expand Down
2 changes: 1 addition & 1 deletion apps/shinkai-app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig({

server: {
port: 4200,
host: 'localhost',
host: true,
fs: {
// Important to server files two levels ahead of the project folder
allow: ['../../'],
Expand Down

0 comments on commit 466018e

Please sign in to comment.