svelte-calculator-app Svelte Themes

Svelte Calculator App

This is a simple calculator using svelte, typescript and SSR

Calculator app using svelte, sveltekit, JSON, Typescript, SSR and API.

create-svelte

Everything you need to build a Svelte project, powered by create-svelte.

Creating a project

If you're seeing this, you've probably already done this step. Congrats!

# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.

Here is the overview of the project

This simple calculator app built with Svelte. This perform the simple mathematical operations. Also using a SSR to compute all the computation by a HTTP POST request then return a response using json format.

This is the layout of this project.

image

Console log all the unseen operation

This will console log all the math operation we use. It will show continuously as long you are using the calculator then show the result.

image

The actual result. You can also continue to add/sub/mul/div more.

image

Top categories

Loading Svelte Themes