@rnacanvas/code.web-server 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@rnacanvas/code.web-server",
3
+ "version": "1.0.0",
4
+ "description": "The RNAcanvas Code web server",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "start": "node server.js"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/pzhaojohnson/rnacanvas.code.web-server.git"
13
+ },
14
+ "author": "pzhaojohnson",
15
+ "license": "MIT",
16
+ "bugs": {
17
+ "url": "https://github.com/pzhaojohnson/rnacanvas.code.web-server/issues"
18
+ },
19
+ "homepage": "https://github.com/pzhaojohnson/rnacanvas.code.web-server#readme",
20
+ "dependencies": {
21
+ "express": "^4.19.2"
22
+ }
23
+ }
package/server.js ADDED
@@ -0,0 +1,12 @@
1
+ const express = require('express');
2
+
3
+ const app = express();
4
+
5
+ // the `dist` directory contains the RNAcanvas Code app to distribute
6
+ app.use(express.static('dist'));
7
+
8
+ const PORT = process.env.PORT || 8080;
9
+
10
+ app.listen(PORT, () => {
11
+ console.log(`Server listening on port ${PORT}...`);
12
+ });