Browse Source

added npm run serve

main
deicidus 2 years ago
parent
commit
1fda969579
  1. 1
      .gitignore
  2. 34
      README.md
  3. 1433
      package-lock.json
  4. 6
      package.json
  5. 6
      tsconfig.json

1
.gitignore vendored

@ -6,6 +6,7 @@ dist-ssr
/production
/cert
*.local
tsconfig.tsbuildinfo
# local env files
.env

34
README.md

@ -1,4 +1,30 @@
# Top cleanup in this codebase
- Replace configuration.js with .env file (loaded automatically by Vite)
- Figure out why the client can't contact the server
- Fix 801 TypeScript errors on server
# AO API Server (ao-server)
An AO server, or AO API server keeps track of the history of a single community. One or more users can connect to the same AO server and communicate.
# Installation
Use [ao-cli](https://www.npmjs.com/package/@autonomousorganization/ao-cli) to install.
If installing manually:
```
cd ~
git clone http://git.coalitionofinvisiblecolleges.org:3009/autonomousorganization/ao-server.git
cd ao-server
npm i --force
```
(`--force` is necessary temporarily because we are using a development version of TypeScript to make compiling simpler using a new feature.)
# Starting the server
To start the server running, do:
`npm run serve`
# Installing as a service
To run the server in the background or on system startup, install it as a systemd service.
Use `ao-cli` to do this; it has have an easy menu option built in for this (very soon).

1433
package-lock.json generated

File diff suppressed because it is too large Load Diff

6
package.json

@ -5,7 +5,7 @@
"license": "AGPL-3.0-or-later",
"scripts": {
"build": "npx tsc --project tsconfig.json",
"server": "npm run build && node dist/src/server/app.js"
"serve": "npm run build && node --loader ts-node/esm src/server/app.ts"
},
"type": "module",
"dependencies": {
@ -37,8 +37,6 @@
"hash.js": "^1.1.7",
"ts-node": "^10.8.1",
"tsconfig-paths": "^4.0.0",
"typescript": "^4.8.0-dev.20220613",
"vite": "^2.9.9",
"vite-plugin-node": "^1.0.0"
"typescript": "^4.8.0-dev.20220613"
}
}

6
tsconfig.json

@ -14,7 +14,7 @@
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"types": ["node", "vite/client"],
"types": ["node"],
"allowSyntheticDefaultImports": true,
"composite": true,
"incremental": true,
@ -29,5 +29,5 @@
"importHelpers": false,
"skipLibCheck": true,
},
"include": ["src/server/*", "src/*.ts", "src/modules/*"]
}
"include": ["src"]
}

Loading…
Cancel
Save