React Fundamental | Summary |
---|---|
React |
|
JSX |
|
Components |
|
User-Defined Component | May be defined as a function or class but must be n |
Typically, logged in users interact with an application that results in data being created, updated and deleted.
In almost every case, the application's code will need to ensure that the logged in user can only update/delete data created by them, not the data of other users.
Today's plan to code a mern-project-template
that includes JWT authentication and can be used to start any MERN-Stack project, including Project 3!
- Create a folder named
mern-project-template
within the~/code/ga
folder. cd
into the newmern-project-template
folder and open it in VS Code.- Open a Terminal in VS Code.
- Run
npm init -y
to create apackage.json
file.
Getting started and knowing how to structure the code in an application is one of the most difficult things for students to figure out.
Also, there might be plenty of sources available to learn about how to use a forEach
loop, but finding help on how to think like a developer and write code to implement an app's features is difficult at best.
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrc
Let's see how to pull updates made by your instructors to these class repos that you previously forked/cloned:
- https://git.generalassemb.ly/SEB-0414/Course
- https://git.generalassemb.ly/SEB-0414/Lessons
- https://git.generalassemb.ly/SEB-0414/Assignments
- In Terminal, move into the repo that you'd like to pull from, for example,
cd ~/code/ga/Lessons
# Clone the repo | |
git clone https://github.com/imartinez/privateGPT | |
cd privateGPT | |
# Install Python 3.11 | |
pyenv install 3.11 | |
pyenv local 3.11 | |
# Install dependencies | |
poetry install --with ui,local |
import requests | |
import json | |
import gradio as gr | |
url = "http://localhost:11434/api/generate" | |
headers = { | |
'Content-Type': 'application/json', | |
} |
#! /bin/sh | |
# This is your log filename | |
LOGFILE=/path/to/temp.log | |
# Create empty file | |
touch $LOGFILE | |
# Define adastat function, which writes drive activity to temp file | |
adastat () { |