Hello, {name}
The name "{name}" has been received from server-side props.
)
}
export function getServerSideProps() {
return {
props: {
name: 'John'
}
}
}
`,
});
```
> You can reference standard Node.js modules, as well as external dependencies while writing your project files. Note that you **don't have to install** those dependencies as Nodebox will manage dependency installation, caching, and resolution automatically.
What we did above was outline a file system state of an actual Next.js project for Nodebox to run. The last step remaining is to run Next.js.
### Run project
To run the project, we will run the `npm dev` command using the Shell API provided by Nodebox.
```js
// First, create a new shell instance.
// You can use the same instance to spawn commands,
// observe stdio, restart and kill the process.
const shell = runtime.shell.create();
// Then, let's run the "dev" script that we've defined
// in "package.json" during the previous step.
const nextProcess = await shell.runCommand('npm', ['dev']);
// Find the preview by the process and mount it
// on the preview iframe on the page.
const previewInfo = await runtime.preview.getByShellId(nextProcess.id);
const previewIframe = document.getElementById('preview-iframe');
previewIframe.setAttribute('src', previewInfo.url);
```
> Note that you can treat `shell.runCommand` similar to `spawn` in Node.js. Learn more about the Shell API in the [documentation](https://github.com/codesandbox/nodebox-runtime/blob/main/packages/nodebox/api.md).
Once this command runs, it will return a shell reference we can use to retrieve the preview URL. By mounting that preview URL on our preview iframe from the setup, we can see the Next.js project running:

That's it! 🎉 **Not a single server was spawned while running this Next.js application**. Everything was managed by Nodebox directly in your browser.
👉 Check out the [Sandbox for this tutorial](https://codesandbox.io/p/sandbox/nodebox-next-js-example-ji27x8).