Rahul S • 9 months ago
Setup Instructions
For people who are a little late and still wanna build something, but the initial setup process is a hassle and causing issues. Here u go :
Create a folder, open your terminal:
1.npm install -g devvit (it would help you authenticate and install packages)
2.devvit login(login to devvit CLI)
3. devvit whoami (verify your login to devvit)->show your username if correctly installed
4.npm create devvit@latest (creates a new devvit app)
Then follow the appropriate instructions on opening links in your browser and running commands.
5.npm run dev(pushes your app created to your subreddit)
If you want to change names of your app and subreddit : change the package.json and devvit.json before running "npm run dev."
If you have created a subreddit and want to uninstall the app from there, because when you run npm run dev, your app is installed into the subreddit, and you can also uninstall/remove it from there.
step a: logging to devvit (follow steps 1 and 2)
step b: devvit uninstall r/linker_game_dev linker-game(app name)
How to install the app in an already existing subreddit:
The npm create devvit@latest command is for initial setup, including a playtest subreddit. For existing projects with a test subreddit, simply point your playtest command to it.
Workflow:
Create Devvit App (if needed): If you don't have an app folder, run npm create devvit@latest and follow prompts (e.g., my-new-app).
Open package.json: Navigate to your project folder and open package.json.
Modify dev:devvit script: Change "dev:devvit" to "devvit playtest r/your_existing_subreddit".
Run Development Command: Execute npm run dev.
Comments are closed.

0 comments