Skip to content

Commit

Permalink
Update development.md (#2248)
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciuspalma authored Oct 2, 2024
1 parent b59c994 commit 1d90bf9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docusaurus/docs/dev-docs/typescript/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ Types should only be imported from `@strapi/strapi` to avoid breaking changes. T

To start Strapi programmatically in a TypeScript project the Strapi instance requires the compiled code location. This section describes how to set and indicate the compiled code directory.

### Use the `strapi()` factory
### Use the `createStrapi()` factory

Strapi can be run programmatically by using the `strapi()` factory. Since the code of TypeScript projects is compiled in a specific directory, the parameter `distDir` should be passed to the factory to indicate where the compiled code should be read:
Strapi can be run programmatically by using the `strapi.createStrapi()` factory. Since the code of TypeScript projects is compiled in a specific directory, the parameter `distDir` should be passed to the factory to indicate where the compiled code should be read:

```js title="./server.js"
const strapi = require('@strapi/strapi');
const app = strapi({ distDir: './dist' });
const app = strapi.createStrapi({ distDir: './dist' });
app.start();
```

Expand Down

0 comments on commit 1d90bf9

Please sign in to comment.