LogoRobo.js
TemplatesDiscord activities

React (JavaScript)

A JavaScript Discord Activity template using React.

React (JavaScript)

Welcome to your fresh Robo.js project!

Build, deploy, and maintain your Discord Activities with ease. With Robo.js as your guide, you'll experience a seamless, file-based setup, an integrated database, and a rich ecosystem.

Getting Started

Create a project with this template:

npx create-robo@next <project-name> --template discord-activities/react-js

Then navigate into your project directory:

cd <project-name>

Run development mode:

npm run dev

A free Cloudflare tunnel is included for easy testing.

App Development

You can find your client-side code in the /src/app folder. This is where you can build your web app using React.

Things are powered by Vite under the hood, so you get the latest ES modules, hot module reloading, and more!

Backend Development

Your server-side code is located in the /src/api folder. This is where you can build your API, webhooks, and other server-side features.

vite.mjs
.env

This backend is powered by @robojs/server.

src/api/health.ts
export default () => {
	return { status: 'ok' }
}
src/api/health.js
export default () => {
	return { status: 'ok' }
}

Hosting

npm run deploy

Learn More

On this page