{"id":43335,"date":"2025-09-26T03:43:33","date_gmt":"2025-09-26T10:43:33","guid":{"rendered":"https:\/\/coderpad.io\/?post_type=programming-language&#038;p=43335"},"modified":"2025-09-26T03:43:34","modified_gmt":"2025-09-26T10:43:34","slug":"next-js","status":"publish","type":"programming-language","link":"https:\/\/coderpad.io\/languages\/next-js\/","title":{"rendered":"Next.js"},"content":{"rendered":"\n<p><strong>Running Next.js on CoderPad<\/strong><\/p>\n\n\n\n<p>This pad is running a Next.js app. Changes are automatically captured as you type them, and other people in the pad can see them. You can add as many files to the project as you need, as well as any NPM packages.<\/p>\n\n\n\n<p>To get started, edit the <code>app\/page.tsx<\/code> file, and see your changes reload on the right.<\/p>\n\n\n\n<p><strong>TypeScript<\/strong><\/p>\n\n\n\n<p>The app is pre-configured to support TypeScript, but you can define <code>.js<\/code> and <code>.jsx<\/code> files instead.<\/p>\n\n\n\n<p><strong>IntelliSense<\/strong><\/p>\n\n\n\n<p>IntelliSense is running across your entire project, allowing you to see when there are syntax errors or to get quick hints for how to resolve errors or TypeScript issues.<\/p>\n\n\n\n<p><strong>Shell<\/strong><\/p>\n\n\n\n<p>A shell is provided to you so you can inspect your container in more detail. The shell can be used to install NPM packages using <code>npm install &lt;package><\/code>. In addition to installing packages, the shell can be used for executing a test suite if you have one defined.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>\u2705 While it&#8217;s possible to edit files directly from the shell, we recommend using the editor to make your changes. That way, other people in the pad can see your changes as they&#8217;re being made.<\/p>\n<\/blockquote>\n\n\n\n<p><strong>Hot Module Reloading<\/strong><\/p>\n\n\n\n<p>Next.js provides Hot Module Reloading by default, meaning that changes you make to the files in your project are automatically applied (after a 2 second debounce); there is no need to refresh the iframe to see the changes. Next.js will display any errors directly in the application output, or if there is a system-wide error, in the logs.<\/p>\n\n\n\n<p><strong>Container Limits<\/strong><\/p>\n\n\n\n<p>The container running your application has a few limitations. Currently, we don&#8217;t limit your CPU usage, though this may change in future. In addition to CPU, we monitor the network bandwidth that is consumed, and limit you to 75 MB for the duration of the container. Finally, we limit the amount of memory accessible to each container to 2 GB.<\/p>\n\n\n\n<p><strong>Assets<\/strong><\/p>\n\n\n\n<p>To add <code>svg<\/code> assets, copy them to the <code>public\/<\/code> directory. You can add them via drag and drop or manual file creation.<\/p>\n","protected":false},"parent":0,"menu_order":0,"template":"","class_list":["post-43335","programming-language","type-programming-language","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/programming-language\/43335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/programming-language"}],"about":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/types\/programming-language"}],"wp:attachment":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/media?parent=43335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}