Skip to content

Commit 7febfd8

Browse files
committed
Migrate to ESM
1 parent 4cc0349 commit 7febfd8

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// @ts-check
2-
const Koa = require('koa');
3-
const bodyParser = require('koa-bodyparser');
4-
const cors = require('@koa/cors');
5-
const websocket = require('koa-easy-ws');
6-
const WebSocketJSONStream = require('@teamwork/websocket-json-stream');
7-
const ShareDB = require('sharedb');
8-
const uuid = require('uuid').v4;
2+
import cors from '@koa/cors';
3+
import WebSocketJSONStream from '@teamwork/websocket-json-stream';
4+
import Koa from 'koa';
5+
import bodyParser from 'koa-bodyparser';
6+
import websocket from 'koa-easy-ws';
7+
import ShareDB from 'sharedb';
8+
import { v4 as uuid } from 'uuid';
99

1010
const COLLECTION_NAME = 'sa';
1111

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "sharedb-ace-backend",
33
"version": "0.0.1",
44
"description": "ShareDB-powered backend for collaborative editing in the Source Academy.",
5+
"type": "module",
56
"main": "index.js",
67
"repository": "https://github.com/source-academy/sharedb-ace-backend",
78
"license": "Apache-2.0",

0 commit comments

Comments
 (0)