Install TypeScript (optional)

This assumes that you have created a Node Application.

Jinaga works well with TypeScript. If you would rather use JavaScript, feel free to skip this step. But if you prefer to use types, you'll need to set up a few extra things.

First, install TypeScript.

npm i -D typescript

Then you'll need to initialize the project.

npx tsc --init

This creates a new file called tsconfig.json. Modify this file to add the outDir setting.

    "compilerOptions": {
        "outDir": "dist"

Then create a new script in package.json that runs tsc.

"scripts": {
    "build": "tsc"

Create a TypeScript file in the src folder to compile. For example, here's a simple index.ts:


You can then build and run the file.

npm run build
node dist/index

If you like, you can add one more script called start that runs the app.

"scripts": {
    "build": "tsc",
    "start": "node dist/index"

Run the app with:

npm start

Continue With

Testing Steps