Getting Started
Installing Requirements
Download and install the following if not already installed
These commands should execute successfully:
$ go version
$ psql --version
$ goimports --help
Setting-up the project
- Clone the project
- Delete the existing
./app
directory - Remove the files in
./data
directory and copy your CSV files here.
$ git clone git@github.com:mainlycricket/CSV_App.git
$ cd CSV_App
$ go build .
$ rm -r app
$ rm data/*
# copy csv files in ./data
General Overview
- Generate schema and examine it i.e.
data/schema.json
$ ./CSV_App schema
- Generate SQL file and seed the database
$ ./CSV_App sql
$ psql -h localhost -U postgres -c 'CREATE DATABASE "DB_Name"'
$ psql -h localhost -U postgres -d "DB_Name" -f data/db.sql
- Examine
data/appConfig.json
and generate app
$ ./CSV_App app
$ cd app && ./setup.sh
- Modify the .env and start the server
# modify .env and start the server
$ ./app
Continue reading to understand all the configurations available