mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-09-11 15:26:19 +03:00
add codespaces template that points to todo tutorial app (#1977)
* Create .devcontainer.json * move dev container * update devcontainer post command * move devcontainer * Update devcontainer.json * Update devcontainer.json * Update devcontainer.json * Update devcontainer.json * Update devcontainer.json * Update devcontainer.json * Update devcontainer.json * Update devcontainer.json * Update devcontainer.json * add readme and env setup * fix script * Update devcontainer.json * Update devcontainer.json * Update setup-env.sh * add dockerfile * Update devcontainer.json * env vars * Update devcontainer.json * Update devcontainer.json * Update devcontainer.json * Update devcontainer.json * Update devcontainer.json * Update devcontainer.json * asdf * Update devcontainer.json * replace gitpod mention with codespaces * Update devcontainer.json * Update devcontainer.json
This commit is contained in:
parent
a6f06a7a25
commit
4f864ab595
27
.devcontainer/devcontainer.json
Normal file
27
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,27 @@
|
||||
// These are GitHub Codespaces specific settings.
|
||||
{
|
||||
"name": "Wasp Todo App Tutorial",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": ["wasp-lang.wasp", "PKief.material-icon-theme"],
|
||||
"settings": {
|
||||
"workbench.iconTheme": "material-icon-theme"
|
||||
}
|
||||
}
|
||||
},
|
||||
"containerEnv": {
|
||||
"WASP_TELEMETRY_CONTEXT": "codespaces"
|
||||
},
|
||||
"forwardPorts": [3000, 3001],
|
||||
"portsAttributes": {
|
||||
"3000": {
|
||||
"label": "React-Vite Client"
|
||||
},
|
||||
"3001": {
|
||||
"label": "NodeJS Server"
|
||||
}
|
||||
},
|
||||
"onCreateCommand": "curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s",
|
||||
"postCreateCommand": "printf 'export WASP_WEB_CLIENT_URL=https://$CODESPACE_NAME-3000.app.github.dev\n' >> $HOME/.bashrc && printf 'export REACT_APP_API_URL=https://$CODESPACE_NAME-3001.app.github.dev\n' >> $HOME/.bashrc && echo 'gh codespace ports visibility 3000:public -c $CODESPACE_NAME\n' >> $HOME/.bashrc && echo 'gh codespace ports visibility 3001:public -c $CODESPACE_NAME\n' >> $HOME/.bashrc",
|
||||
"workspaceFolder": "/workspaces/wasp/examples/tutorials/TodoApp"
|
||||
}
|
45
examples/tutorials/TodoApp/README.md
Normal file
45
examples/tutorials/TodoApp/README.md
Normal file
@ -0,0 +1,45 @@
|
||||
# Todo App Tutorial Example App
|
||||
This is an example app that complements the [Intro Wasp Tutorial](https://wasp-lang.dev/docs/tutorial/create). It is a simple Todo App that demonstrates how to use Wasp to build a truly full-stack web app quickly and easily.
|
||||
|
||||
This example app represents the final state of the tutorial. If you'd prefer to follow it step-by-step, you can find [the tutorial here](https://wasp-lang.dev/docs/tutorial/create).
|
||||
|
||||
This project also allows you to run the app in GitHub Codespaces, so you can try out Wasp without installing anything on your machine.
|
||||
|
||||
## Running the App in GitHub Codespaces
|
||||
|
||||
On the [main Wasp repo page](https://github.com/wasp-lang/wasp), click on the green "Code" button and create a new Codespace.
|
||||
|
||||
Give the Codespace some time to install Wasp and finish initializing, then in the terminal run:
|
||||
|
||||
```bash
|
||||
wasp db migrate-dev
|
||||
```
|
||||
|
||||
Once the migration is done, you can start the app by running:
|
||||
|
||||
```bash
|
||||
wasp start
|
||||
```
|
||||
|
||||
This will start the app. The codespace should prompt you with an "Open in Browser" button. If not, click on the "Ports" tab next to the terminal in the bottom of the Codespace and click on the "forwarded address" for port 3000.
|
||||
|
||||
## Running the App Locally
|
||||
After you've cloned this repository, you can run the app locally by following these steps:
|
||||
|
||||
Install Wasp
|
||||
|
||||
```bash
|
||||
curl -sSL https://get.wasp-lang.dev/installer.sh | sh
|
||||
```
|
||||
|
||||
Position yourself in the project directory, then migrate the DB:
|
||||
|
||||
```bash
|
||||
wasp db migrate-dev
|
||||
```
|
||||
|
||||
Finally, run the app:
|
||||
|
||||
```bash
|
||||
wasp start
|
||||
```
|
@ -43,7 +43,7 @@ That's it 🎉 You have successfully created and served a new full-stack web app
|
||||
:::
|
||||
|
||||
:::tip Try Wasp Without Installing 🤔?
|
||||
Give Wasp a spin in the browser without any setup by running our [Wasp Template for Gitpod](https://github.com/wasp-lang/gitpod-template)
|
||||
Give Wasp a spin in the browser with GitHub Codespaces by following the intructions in our [Tutorial App README](https://github.com/wasp-lang/wasp/tree/main/examples/tutorials/TodoApp)
|
||||
:::
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ That's it 🎉 You have successfully created and served a new full-stack web app
|
||||
:::
|
||||
|
||||
:::tip Try Wasp Without Installing 🤔?
|
||||
Give Wasp a spin in the browser without any setup by running our [Wasp Template for Gitpod](https://github.com/wasp-lang/gitpod-template)
|
||||
Give Wasp a spin in the browser with GitHub Codespaces by following the intructions in our [Tutorial App README](https://github.com/wasp-lang/wasp/tree/main/examples/tutorials/TodoApp)
|
||||
:::
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user