Skip to content

Commit

Permalink
Merge pull request #1096 from strapi/dev/typescript-deployment
Browse files Browse the repository at this point in the history
add TypeScript to deployment docs
  • Loading branch information
stb13579 committed Dec 22, 2022
2 parents 8475408 + cee0baf commit 2fa5f1f
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -178,11 +178,18 @@ We highly recommend using [pm2](https://github.com/Unitech/pm2/) to manage your
If you need a server.js file to be able to run `node server.js` instead of `npm run start` then create a `./server.js` file as follows:

```js
const strapi = require('@strapi/strapi');
// path: `./server.js`

const strapi = require('@strapi/strapi');
strapi(/* {...} */).start();
```

:::caution

If you are developing a `TypeScript`-based project you must provide the `distDir` option to start the server.
For more information, consult the [TypeScript documentation](/developer-docs/latest/development/typescript.md#use-the-strapi-factory).
:::

### Advanced configurations

If you want to host the administration on another server than the API, [please take a look at this dedicated section](/developer-docs/latest/development/admin-customization.md#deployment).
Expand Down

0 comments on commit 2fa5f1f

Please sign in to comment.