# Basic setup of running Babylon.js NullEngine with server side (node.js) using TypeScript

**URL:** <https://forum.babylonjs.com/t/basic-setup-of-running-babylon-js-nullengine-with-server-side-node-js-using-typescript/15817>\
**Category:** Questions\
**Created:** [November 18, 2020, 4:23pm UTC](https://forum.babylonjs.com/t/basic-setup-of-running-babylon-js-nullengine-with-server-side-node-js-using-typescript/15817 "2020-11-18T16:23:26Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [November 19, 2020, 10:52pm UTC](https://forum.babylonjs.com/t/basic-setup-of-running-babylon-js-nullengine-with-server-side-node-js-using-typescript/15817/6 "2020-11-19T22:52:12Z")

</div>

As explained earlier node-js expects common.js import style until version 14 so no import / export keywords could work before.

In order to convert our import statements, either you could rely on a bundler like webpack/parcel/rollup or you could transpile your files using babel.

Here using babel and babel-node for instance, you can add the following dependencies:

```auto
"devDependencies": {
    "@babel/cli": "^7.12.1",
    "@babel/core": "^7.12.3",
    "@babel/node": "^7.12.6",
    "@babel/plugin-transform-modules-commonjs": "^7.12.1",
    "@babel/preset-env": "^7.12.1"
  }

```

then add a babel.config.js at the root containing:

```auto
module.exports = function (api) {
  api.cache(false);

  return {
    presets: ["@babel/preset-env"],
    plugins: ["@babel/plugin-transform-modules-commonjs"],
  };
}

```

Now in your start command replace node by babel-node:

```auto
"start": "babel-node -i [] dist/index.js",

```

`-i []` will help transpiling file from the node\_modules folder as well.

But as a general way here using a bundler like you would do for the web might make things easier

---

_[View the full topic](https://forum.babylonjs.com/t/basic-setup-of-running-babylon-js-nullengine-with-server-side-node-js-using-typescript/15817)._
