This sample codebase consists of a separate client & server code.
It's set up in a simple way to make it as easy as possible to start making changes,
the only requirement is having recent versions of node
& npm
installed.
This is not a production ready configuration (nor production ready code), it's only set up for easy development, including live reload.
To run the client bundler:
cd client
npm install
npm run dev
The processed code will be available at http://localhost:3001
To start the server:
cd server
npm install
npm run dev
The server will be available at http://localhost:3000 - the page is automatically configured to use the assets served by vite on port 3001.
You should see something similar to this page:
If you prefer to completely disable TypeScript for a file, add // @ts-nocheck
on the first line.
If on the other hand you'd like to enable strict type checking, modify tsconfig.json
according to your needs.
Note that you can import plain JavaScript files that won't be fully typechecked.
You should start by looking at the migration in ./migrations
folder.
If you prefer to browse the DB using SQL, you can use the sqlite command line (just run sqlite3 ./db.sqlite3
)
or any other SQL client that supports sqlite.
If for any reason the database becomes unusable, you can rebuild it using ./reset_db.sh
script`.
All the instructions are available here.