Skip to content

Instantly share code, notes, and snippets.

View samlinux's full-sized avatar

samlinux samlinux

View GitHub Profile
@samlinux
samlinux / IC1
Last active March 17, 2022 08:53
Angular meets Internet Computer 1
$ sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
@samlinux
samlinux / IC2
Last active March 17, 2022 08:53
Angular meets Internet Computer
# create the base project folder
mkdir projectFolder
cd projectFolder
# create the backend project structure
mkdir -p backend/src/backend
mkdir backend/dist
# create the frontend project structure
ng new frontend
@samlinux
samlinux / IC4
Last active March 17, 2022 09:03
Angular meets Internet Computer
touch dfx.json
{
"canisters": {
"backend": {
"main": "src/backend/main.mo",
"type": "motoko"
},
"frontend": {
"dependencies": [
"backend"
@samlinux
samlinux / IC5
Created March 17, 2022 09:01
Angular meets Internet Computer
touch backend/src/backend/main.mo
actor {
public func greet(name : Text) : async Text {
return "Hello, " # name # "!";
};
};
@samlinux
samlinux / IC6
Created March 17, 2022 09:06
Angular meets Internet Computer
# in terminal 1
dfx start -clean
# your local IC replica is running
>Mar 16 09:56:47.497 INFO Starting server. Listening on http://127.0.0.1:8000/
@samlinux
samlinux / IC7
Created March 17, 2022 09:12
Angular meets Internet Computer
dfx build backend - check
@samlinux
samlinux / IC8
Last active March 17, 2022 09:13
Angular meets Internet Computer
dfx deploy backend
@samlinux
samlinux / IC9
Created March 17, 2022 09:14
Angular meets Internet Computer
dfx canister call backend greet '("RockStar")'
@samlinux
samlinux / IC10
Created March 17, 2022 09:17
Angular meets Internet Computer
dfx generate backend
@samlinux
samlinux / IC11
Created March 17, 2022 09:19
Angular meets Internet Computer
cd projectFolder/frontend
ng new frontend
cd frontend