-
-
Notifications
You must be signed in to change notification settings - Fork 95
Getting Started
Aspen edited this page Oct 15, 2025
·
3 revisions
This guide walks you through setting up steamworks.js in your project.
- Node.js
- Steam must be installed and running
- A Steam App ID (use
480— Valve’s Spacewar test app) - For desktop apps: Electron or a compatible wrapper
npm install steamworks.jsBelow are quick examples for different environments.
const steamworks = require('steamworks.js');
const client = steamworks.init(480);
console.log('Player name:', client.localplayer.getName());const { app, BrowserWindow } = require('electron');
const steamworks = require('steamworks.js');
app.whenReady().then(() => {
const client = steamworks.init(480);
const mainWindow = new BrowserWindow({
width: 1280,
height: 720,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
},
});
mainWindow.loadFile('index.html');
steamworks.electronEnableSteamOverlay();
});import steamworks from "steamworks.js";
const client = steamworks.init(480);
console.log(`Welcome, ${client.localplayer.getName()}`);Create a file named steam_appid.txt in your project root:
480
Add it to .gitignore to keep it out of version control.
const steamworks = require('steamworks.js');
const client = steamworks.init(480);
console.log('Steam initialized ✓');
console.log('Player:', client.localplayer.getName());If valid info prints out, your setup is working correctly.