kenperlin / chalktalk

MIT License
2.13k stars 137 forks source link

Create OS-independent install + run-server system #18

Open hugolpz opened 7 years ago

hugolpz commented 7 years ago

Regardless of OS, all users will have Nodejs / npm. Also, installing the server via node / npm scripts would ease install by standizing it. Proposal :

/Chalktalk
   └─┬  /Server/
     ├── /node_modules/   -- we want to install that !
hugolpz commented 7 years ago

Add ./Chalktalk/package.json

package.json is there a simple descriptor of Chalktalk + npm scripts.

{
  "name": "Chalktalk",
  "version": "0.0.1",
  "description": "Chalktalk is an educational graphic blackboard",
  "main": "Chalktalk is a graphic blackboard to teach sciences, computer sciences and more. A list of +250 objects ('glyphs') with specific behaviors is available. Glyphs can be connected and affect each others via an input/output maner, so meaningful mecanisms can be build. Glyphs can also be reprogrammed, stylized.",
  "dependencies": { },
  "repository": {
    "type": "git",
    "url": "git://github.com/kenperlin/chalktalk.git"
  },
  "bugs": { "url": "https://github.com/kenperlin/chalktalk/issues" },
  "author": [ "Ken Perlin & Co" ],
  "keywords": [  "education" ],
  "scripts": {
    "install": "cd ./server && npm install",
    "server": "node ./server/main.js",
    "start": "google-chrome http://localhost:11235"
  },
  "license": ""
}

See scripts.install and scripts.server .

Update new install / run process on wiki's documentation

The following is OS-independent, and NodeJS-dependent :

# git clone blabla
$npm run install   # install server's dependencies
$npm run server  # runs server
$npm run start     # opens chrome, page localhost:11235

Add *.windows.bat files

.bat files can be provided for Windows user who prefer to launch commands via mouse clicking.

install.windows.bat :

Former Former's status New New's status
cd server
npm install
Working npm run install not tested on windows

run.windows.bat :

Former Former's status New New's status
start /b node server\main.js
start http://localhost:11235/
Working npm run server && start http://localhost:11235/ not tested on windows
hugolpz commented 7 years ago

Anyone interested by integrating / testing this ?

Kronopath commented 7 years ago

That looks pretty nifty. Create a pull request and we can go ahead and test it!