Initializing a Project
Last updated
Last updated
Open a folder in your code editor of choice, and open your terminal of choice in the same folder. We are going to initialize our project with Bun, which will create a base project with the required files.
It will then ask you some questions in the following order.
For now, put these values:
package name <your_project_name>
entry point src/index.ts
As you can see in your project, you now have many new files.
Our entry point file is an index.ts
file in the src
directory/folder.
This will be the main file that our application will run off.
Yes, our entire application will start from this one file.
If we open our index.ts
, we will see one single default line of code.
We can run this index.ts
file by using either of these simple commands:
When we run this command, we should see the default text in the console, just like how it is in the index.ts
file.