Everything you need to build a Svelte project, powered by create-svelte
.
npm install
Create a .env
file and add the following lines:
MONGODB_URI="mongodb+srv://<username>:<password>@<address>/<database>?retryWrites=true&w=majority"
<username>
with your database's username<password>
with your database's password<address>
with your database's address<database>
with your database nameDo one import and create search index named default
.
Follow this guide to setup Azure Translator Cognitive Services.
Add the following lines to your .env
file:
AZURE_TRANSLATE_KEY="<your key>"
AZURE_TRANSLATE_REGION="<your region>"
Start SvelteKit development with the following command:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
Start SocketIO development with the following command:
node express.js
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
By default the application will be deployed to /build
, which can be started with node build
.
But we have a special Express server with SocketIO that can be started with the following command:
npm run deploy