Download next.js/test/production/app-dir/action-tracing/app/action.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 240 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/app-dir/action-tracing/app/action.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/production/app-dir/action-tracing/app/action.ts
-
curl -L -o action.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/app-dir/action-tracing/app/action.ts
240 Bytes
| 'use server' | |
| try { | |
| if (process.env.NEXT_RUNTIME !== 'edge') { | |
| require('fs').readFileSync( | |
| require('path').join(process.cwd(), 'data.txt'), | |
| 'utf8' | |
| ) | |
| } | |
| } catch {} | |
| export async function action() { | |
| return 'action' | |
| } | |