Skip to content

Instantly share code, notes, and snippets.

@Sean-Bradley
Last active August 6, 2020 20:10
Show Gist options
  • Save Sean-Bradley/676c172a1ee4ed01a9af91373c364f00 to your computer and use it in GitHub Desktop.
Save Sean-Bradley/676c172a1ee4ed01a9af91373c364f00 to your computer and use it in GitHub Desktop.
Basic Threejs Server
const express = require('express')
const app = express()
const path = require('path')
app.use(express.static(__dirname + '/public'))
app.use('/build/', express.static(path.join(__dirname, 'node_modules/three/build')));
app.use('/jsm/', express.static(path.join(__dirname, 'node_modules/three/examples/jsm')));
app.listen(3000, () =>
console.log('Visit http://127.0.0.1:3000')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment