Run the installer, accept the licence, and keep the default options.
Leave Add to PATH checked, then click Install.
Click Finish to launch VS Code. Open a new
Command Prompt and check the installation:
code --version
Version details should appear. Your code editor is ready!
Open a folder & set up Codex
In Windows File Explorer, create a folder named web-app-demo
in your Documents folder.
In VS Code, choose File > Open Folder and select
web-app-demo.
Open Extensions with Ctrl+Shift+X.
Search for Codex and install
Codex by OpenAI.
Open Codex and choose Sign in with ChatGPT.
Complete sign-in in your browser, then return to VS Code.
Trust the project & find Codex
For the folder you created, accept the workspace trust prompt.
If it is in Restricted Mode, press Ctrl+Shift+P,
run Workspaces: Manage Workspace Trust, and choose Trust.
Click the Codex icon in VS Code. If it is hidden,
press Ctrl+Shift+P and run Codex: Open Codex Sidebar.
Start a new chat. The input box at the bottom of the Codex panel
is where you describe the changes you want.
Codex input
Describe what you want to build or change…
Create a basic Sails.js app
Open Command Prompt and run these commands one at a time:
npm install -g sails
cd "%USERPROFILE%\Documents\web-app-demo"
sails new hello-world
When asked, choose 2. Empty for a basic project. Wait for dependencies to finish installing, then run:
cd hello-world
code .
code . opens the current project folder in VS Code.
Hello world with Codex
With hello-world open, enter this in the Codex input:
Example prompt
Change this Sails app’s homepage to “Hello world from Ashley Simons”
and add simple CSS.
Send the prompt, let Codex edit the files, and review the changes.
Choose Terminal > New Terminal. Run cmd to switch to Command Prompt, then run sails lift from the project folder.
View http://localhost:1337 in your browser. Stop: Ctrl+C in the server terminal. Restart: run sails lift again.
Why use Git?
Git is version control: a history of changes to your code.
Save checkpoints. A commit records a snapshot of your project with a message explaining the change.
Recover working code. Compare versions and restore earlier changes when something breaks.
Work together. Branches let you develop changes separately, then merge them into the project.
Track releases. Know which version of your code you are deploying.
Commit before and after a Codex task so you can review what changed.
Git works locally; Bitbucket hosts a shared copy of the repository online.
Launch Docker Desktop, complete setup, and wait until
its engine is running in Linux containers mode.
Open a new Command Prompt and verify the installation:
docker --version
docker run --rm hello-world
The test container should print “Hello from Docker!”
Prepare Docker with Codex
Example prompt
Look at this Sails.js project and set up a production-ready Dockerfile
for DigitalOcean App Platform. Add .dockerignore, use a supported Node.js image,
build Sails assets, and run as non-root in production. Listen on 0.0.0.0
using PORT (default 8080). Use environment variables for secrets;
document database/session setup and local test commands.
Review the generated files. Ask Codex to build and test the container locally
and resolve any errors before deployment.
In Source Control, stage the Dockerfile, .dockerignore,
and related app changes. Commit as “Add production Docker setup”.
Push the commit to Bitbucket’s master branch.
Create the App Platform app
In App Platform,
choose Create App, then Bitbucket as the source.
Connect your account and authorize DigitalOcean to access the repository.
Select your private hello-world repository and branch
master. Enable Autodeploy for future pushes.
Confirm the Dockerfile build and Web Service type.
Match the HTTP port to the app: 8080 for our setup.
Set NODE_ENV=production and PORT=8080.
Add the required database/session configuration and encrypt secret values.
Review the region, resources, and price, then choose Create Resources.
Follow deployment logs and open the app’s live URL when ready.