documentation
documentation copied to clipboard
add TypeScript to deployment docs
What does it do?
replicate the PM2 code example in the deployment page for server.js
start command.
Why is it needed?
Describe the issue you are solving.
Related issue(s)/PR(s)
Let us know if this is related to any issue/pull request
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
documentation | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Dec 22, 2022 at 8:18AM (UTC) |
documentation-docu-mvp | ❌ Failed (Inspect) | Dec 22, 2022 at 8:18AM (UTC) |
It could be confusing that in the TS code block we're not actually using TypeScript, but instead, just showing the option needed to support TS projects
I'd say that we either don't need to have a TS code block and just mention that the
distDir
option is needed for TS projects.Or we can use a TS code block like the following.
// path: `./server.ts` import strapi from '@strapi/strapi' strapi({ distDir: '<path_to_your_out_dir>' }).start()
Though with that approach, it's worth mentioning that the user would need to run
node <path_to_your_out_dir>/server.js
as you can't run TS file directly with node.
I agree we might confuse users by providing a TS code block that isn't a TS example. A callout with information regarding typescript ("if strapi typescript project then provide the distDir option") might be clearer. I'll let you judge that @pwizla @StrapiShaun .
It could be confusing that in the TS code block we're not actually using TypeScript, but instead, just showing the option needed to support TS projects I'd say that we either don't need to have a TS code block and just mention that the
distDir
option is needed for TS projects. Or we can use a TS code block like the following.// path: `./server.ts` import strapi from '@strapi/strapi' strapi({ distDir: '<path_to_your_out_dir>' }).start()
Though with that approach, it's worth mentioning that the user would need to run
node <path_to_your_out_dir>/server.js
as you can't run TS file directly with node.I agree we might confuse users by providing a TS code block that isn't a TS example. A callout with information regarding typescript ("if strapi typescript project then provide the distDir option") might be clearer. I'll let you judge that @pwizla @StrapiShaun .
I like this idea. I added a callout instead and think it is much clearer. Thanks for the suggestion.
This pull request has been mentioned on Strapi Community Forum. There might be relevant details there:
https://forum.strapi.io/t/new-documentation-release-v4-5-5/24573/1