Skip to content

Commit

Permalink
feat(Server): documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Djangss committed Nov 30, 2024
1 parent 81223a0 commit 5d3a3ee
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
21 changes: 19 additions & 2 deletions docs/source/server/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,28 @@ Follow these steps to set up and run the AREA Client Web project.
.. code-block:: sh
cd AREA/server
// TODO: define the command to install the GO packages
go mod tidy
3. Run the project
This command will ensure all required dependencies are downloaded and your go.mod and go.sum files are up to date.

3. Set Up the Environment Variables
------------------
.. code-block:: sh
cp .env.example .env
Update the .env file with the required environment variables.

4. Run the project
------------------

.. code-block:: sh
go run
alternatively, you can run the project with the following command:

.. code-block:: sh
go build -o area-server main.go
./area-server
2 changes: 1 addition & 1 deletion server/internal/utils/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

func HashPassword(password string) string {
salt := []byte("randomSalt") // Ideally, generate a unique salt per user
salt := []byte("randomSalt")
hash := argon2.IDKey([]byte(password), salt, 1, 64*1024, 4, 32)
return base64.RawStdEncoding.EncodeToString(hash)
}

0 comments on commit 5d3a3ee

Please sign in to comment.